Forum Moderators: coopster

Message Too Old, No Replies

Displaying Images in Cells from a Database!

some advice please....

         

dreamcatcher

7:23 pm on Feb 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I`m pulling a random 15 images from a mysql database. I want these to display on 3 rows in a table. Each row has 5 cells containing the images.


<table>
<tr>
<td>Image1</td>
<td>Image2</td>
<td>Image3</td>
<td>Image4</td>
<td>Image5</td>
</tr>
<tr>
<td>Image6</td>
<td>Image7</td>
<td>Image8</td>
<td>Image9</td>
<td>Image10</td>
</tr>
<tr>
<td>Image11</td>
<td>Image12</td>
<td>Image13</td>
<td>Image14</td>
<td>Image15</td>
</tr>
</table>

So how can I do this with a single query? I can do one row and loop the cells easy enough, or do multiple queries, but how can I create a row, show 5 images, then another row and another 5 images and so on with just the one query? Is it possible?

Thank you!

coopster

7:30 pm on Feb 16, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Like this? [webmasterworld.com]

dreamcatcher

10:02 pm on Feb 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



LOL! Coop, you`re a genius. :)