close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Multiple Repeat regions and Recordsets question

Thread began 5/04/2009 11:46 am by mustang_sally_85344510 | Last modified 7/27/2010 7:05 am by mustang_sally_85344510 | 8288 views | 7 replies

Danilo Celic

Well a quick way to get this to work would be to create duplicate recordsets using the same settings. In fact with Recordsets, you can copy and paste them in the Server Behaviors panel. Select your recordset, right click, select copy, then right click and select Paste. You'll now have a new recordset. You can edit it to give it a name that you'll recognize better, if you feel like it. You can then use the "new" recordset as the one to repeat over for the Repeat Region you need to have on your page.

Or, you can "reset" the recordset back to the first result item, and then wrap the area you want to repeat with a copy of the Dreamweaver repeating code.

To reset your recordset back to the start of the recordset use code similar to the following (replace Recordset1 with the name of your recordset). This code will need to be inserted immediately above any repeat region you want to add, so if you have 5 repeat regions, then you'll have this on the page 4 times, no need to have it prior to the first one on the page, as the recordset is already at the beginning:

<?php
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>

Then any region you want to repeat, add this before the start of the region:
<?php do { ?>

and this after (again replace Recordset1 with the name of your recordset):
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>

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...