close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Repeat region on relational table

Thread began 4/18/2017 9:33 am by Kumel | Last modified 4/19/2017 11:19 am by Ray Borduin | 3836 views | 18 replies |

Kumel

Repeat region on relational table

I have a repeat region & within that another repeat region & relational table into this.
So it works this way:

<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_DT){
?>
<?php
mysql_select_db($database_con1, $con1);
$query_DocumentDetails = "SELECT * FROM Documents WHERE DocumentID IN (".$row_DT['DTDocumentID'].")";
$DocumentDetails = mysql_query($query_DocumentDetails, $con1) or die(mysql_error());
$row_DocumentDetails = mysql_fetch_assoc($DocumentDetails);
$totalRows_DocumentDetails = mysql_num_rows($DocumentDetails);?>
<input type="hidden" name="WADA_RepeatID_DTID_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_DTID_<?php echo $RepeatSelectionCounter_1; ?>" value='<?php echo $row_DT["DTID"]; ?>' />
<input <?php if (!(strcmp($row_DT['DTID'],WA_AB_returnPreSelectValue($WA_PreSelect_RelationalTable_1, $row_DT['DTID'])))) {echo "checked=\"checked\"";} ?> name="DocChecked_<?php echo $RepeatSelectionCounter_1; ?>" type="checkbox" value="<?php echo $row_DT['DTID']?>" />
<?php echo $row_DocumentDetails['DocumentName']?> </br>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_DT && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_DT = mysql_fetch_assoc($DT);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?></td>

</tr>
<?php
} // RepeatSelectionCounter_2 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_2 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_2 && $RepeatSelectionCounter_2_IterationsRemaining != 0){
if(!$row_DocumentTypes && $RepeatSelectionCounter_2_Iterations == -1){$RepeatSelectionCounter_2_IterationsRemaining = 0;}
$row_DocumentTypes = mysql_fetch_assoc($DocumentTypes);
}
$RepeatSelectionCounter_2++;
} // RepeatSelectionCounter_2 End Loop
?>




Shared link privately to view it.

Sign in to reply to this post

Kumel

private

Sign in to reply to this post

Ray BorduinWebAssist

Try moving the code on line 275 up above line 266. It looks like that might fix it.

Sign in to reply to this post
Did this help? Tips are appreciated...

Kumel

i m not able to understand. 275 looks broken.

page attached.

Sign in to reply to this post

Ray BorduinWebAssist

Try updating line 275 from:
$RepeatSelectionCounter_1++;

to:
if ($row_DT) $RepeatSelectionCounter_1++;

Sign in to reply to this post
Did this help? Tips are appreciated...

Kumel

Thank you so much but why is it didnt work without it?

Code were suppose to be as it was, if i m not wrong.

Sign in to reply to this post

Ray BorduinWebAssist

It just wasn't designed to use with nested repeat regions like that. The minor change allows it to work in a nested environment.

Sign in to reply to this post
Did this help? Tips are appreciated...

Kumel

Sir just while testing when i "check" all checkboxes. some of them dont get checked.

Sign in to reply to this post

Ray BorduinWebAssist

Are they inserted into the database properly? I'd first narrow down if it is an issue with them not being added to the database properly, or if it is just an issue with them not being checked.

Sign in to reply to this post
Did this help? Tips are appreciated...

Kumel

issue with that particular checkbox ie. No, Voter ID, passport.. not inserting into db

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...