Jump to content

Result Query multiple tables next to eachother


kbloem

Recommended Posts

Hi,

 

i have a database with multiple records. One of those values is an image. When i query the database and i want only the images as a result it gives the result in a field. It then fills up the field horizontal and when there is no more field left it starts a new row. That is what i want.

 

But now i want some extra info next to the picture so i put that in a table with two colums like this:

 

echo '<table border="1" width="400"><td><a href="'.$row['website'].'"> <img src="'.$row['prod_img'].'">

'.$row['prod_name'].' <a href="'.$row['website'].'">'.$row['website'].'</td></table>

';}}

 

But i still want the result to fill up the field and when the field is full i want the next results on a row below this....

 

Anyone?

Link to comment
Share on other sites

Ok to be clear, this is what i have

 

echo'<table border="0">

<tr>

<td>

<a href="'.$row['website'].'"> <img src="'.$row['prod_img'].'">

</td>

<td>

'.$row['prod_name'].'<br/><br/> <a href="'.$row['website'].'">'.$row['website'].'

</td>

</tr>

</table>

';}}

 

Now it gives the next result below the other and i want i to give the result in 3x3.....

 

Result 1 , Result 2, Result 3

Result 4 , Result 5, Result 6

Result 7 , Result 8, Result 9

 

I hope it's clear now...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.