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?

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. :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.