I want to call a set of records from the database but in addition, call out the most recent record in a repeating recordset. Basicly, single out the first record so that I can modify it’s appearance on a web page and in short, create a conditional statement that looks somewhat like this:
if record = 1, display “current cover”, else display “no cover”.
Here is the code I am working with:
<li class="boxgrid peek">
<a href="project.php?work_ID=<?php echo $row_rstWebDesign['work_ID']; ?>" class="viewer-details">view project</a>
<a href="img_portfolio_dir/<?php echo $row_rstWebDesign['img_1']?>" rel="shadowbox[<?php echo $row_rstWebDesign['CatSe_type']?>]" title="<?php echo $row_rstWebDesign['caption_1']?>" class="viewer-gallery">view <?php echo $row_rstWebDesign['CatPr_type']; ?> <?php echo $row_rstWebDesign['CatSe_type']; ?> gallery</a>
<img src="img_portfolio_dir/<?php echo $row_rstWebDesign['cover_thmb']?>" class="cover" style="clip:rect(0px, 266px, 124px, 0px);" />
<img src="images/hover.png" class="hover cover" />
<!-- image only exists on the first, most recent record -->
<img src="images/the-latest.png" class="cover current" />
</li>
I am hoping someone can help - been stuck on this problem for awhile and it’s causing me mass frustration. Thanks.
Mike