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 http://www.holytrinitypensacola.org/photos.php
recordset on that page (1-13)
<div align="center">
<?php
$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>
<?php
$Recordset1->moveNext();
}
$Recordset1->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</div>
Tables are:
photos_category with columns category_ID and category_name
photos with columns photos_ID photos_file photos_alt and cat_ID