Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Make a Recordset display in Rows and Columns

    Sorry - I am new to this so I hope it makes sense.

    So I am working in dreamweaver and I am trying to make a recordset that will display a dynamic image and a dynamic title across 4 columns and 4 rows. So They're will be a total of 16 different images being shown with 16 titles being sucked in from Sql.

    Right now I have 16 images but they are being listed each in different rows. Has anyone come across a scenario / tutorials of what I am trying to?

    Here is some of my code - but not all of it:

    <?php do { ?>
    <tr>
    <td width="160" height="210" align="center" valign="top"><a href="Showart.php?recordID=<?php echo $row_Recordset1['ID']; ?>"><img src="<?php echo $row_Recordset1['thumbpath']; ?>" alt="" width="150" height="150" border="0" /><br />
    <?php echo $row_Recordset1['Artname']; ?></a></td>

    <td width="160" height="210" align="center" valign="top"><a href="Showart.php?recordID=<?php echo $row_Recordset1['ID']; ?>"><img src="<?php echo $row_Recordset1['thumbpath']; ?>" alt="" width="150" height="150" border="0" /><br />
    <?php echo $row_Recordset1['Artname']; ?></a></td>

    <td width="160" height="210" align="center" valign="top"><a href="Showart.php?recordID=<?php echo $row_Recordset1['ID']; ?>"><img src="<?php echo $row_Recordset1['thumbpath']; ?>" alt="" width="150" height="150" border="0" /><br />
    <?php echo $row_Recordset1['Artname']; ?></a></td>

    <td width="160" height="210" align="center" valign="top"><p><a href="Showart.php?recordID=<?php echo $row_Recordset1['ID']; ?>"><img src="<?php echo $row_Recordset1['thumbpath']; ?>" alt="" width="150" height="150" border="0" /><br />
    <?php echo $row_Recordset1['Artname']; ?></a></p></td>
    </tr>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>

    This creates 4 columns each with SAME data , and 4 rows with different data. Is there a way to make each column take the next value in the recordset?

    Thanks,
    Dale W

  • #2
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmm I think i posted too soon - I figured it out =D
    Last edited by DaleW; 01-10-2010 at 08:27 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •