...

View Full Version : Make a Recordset display in Rows and Columns



DaleW
01-10-2010, 07:55 PM
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 :thumbsup:

DaleW
01-10-2010, 08:08 PM
Hmm I think i posted too soon - I figured it out =D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum