Jump to content

[SOLVED] Displaying SQL Query results in 3 column table


dgmuk

Recommended Posts

Hi,

 

I would like to be able to display the results of an sql query in an html table, but the results need to be displayed in three columns, for example:

 

Column 1  Column 2  Column 3

Result 1    Result 2    Result 3

Result 4    Result 5    Result 6

Result 7    Result 8    Result 9

 

I've tried to find the answers on the internet but i can't find anything that suits my needs!

 

Can anyone help?

Link to comment
Share on other sites

SELECT table1.row1,table1.row2,table1.row3,table2.row1,table2.row2,table2.row3,table3.row1,table3.row2,table1.row3 FROM tab1 AS table1, tab2 AS table2, tab3 AS table3 WHERE table1.id='$id' AND table2.id='$id' AND table3.id='$id'

 

I think that is right. :)

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.