close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


writing a recordset help

Thread began 11/25/2019 9:23 am by JBWebWorks | Last modified 11/25/2019 10:30 am by Ray Borduin | 314 views | 1 replies |


writing a recordset help

Built a photo gallery with 13 categories of photos and each category has ID and photos have a cat_ID.
When the client wants to rename a category or sort differently, each and every photos.cat_ID has to be changed.
On the photos page, I have 13 different recordsets and want to know a better way to write a single recordset so that when the categories change, the photos.cat_ID change automatically.
Not sure if I am asking this where it makes sense.
link to the photos page
recordset on that page (1-13)

<div align="center">
$wa_startindex = 0;
while(!$Recordset1->atEnd()) {
$wa_startindex = $Recordset1->Index;
<a href="photos/<?php echo($Recordset1->getColumnVal('photos_file')); ?>" rel="lightbox" title="<?php echo($Recordset1->getColumnVal("photos_alt")); ?>"><img src="photos/<?php echo($Recordset1->getColumnVal("photos_file")); ?>" alt="<?php echo($Recordset1->getColumnVal("photos_alt")); ?>" /></a>
$Recordset1->moveFirst(); //return RS to first record

Tables are:
photos_category with columns category_ID and category_name
photos with columns photos_ID photos_file photos_alt and cat_ID

Sign in to reply to this post

Ray BorduinWebAssist

I don't understand why you would need to change the CatID if the category name or order was changed. I'd probably have to look at the application to comment on how to do it more efficiently. Perhaps we could do a premier support ticket to look into this together.

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

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





Ease of use


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