Gossamer Forum
Home : General : Databases and SQL :

Split MYSQL select results into 2 columns

Quote Reply
Split MYSQL select results into 2 columns
Hi! I'm anewbie in using MySQL and PHP. I manage to search MYSQL database for some terms and it's returning the results in a table in html. However, as the search results can be very long, I was wondering if it was possible to split the results into 2 column table.

This is what I get now:

ID CD
1 A
2 B
3 C
4 D

and so on...

But I would like it to be:

ID CD ID CD
1 A 2 B
3 C 4 D
and so on...

I tried to find many articles on using both PHP codes and mysql codes to achieve what I need but to no avail. Could anyone help me, please?
Julian
Subject Author Views Date
Thread Split MYSQL select results into 2 columns vampy 6881 Oct 4, 2002, 3:00 AM
Thread Re: [vampy] Split MYSQL select results into 2 columns
hennagaijin 6651 Oct 4, 2002, 4:34 AM
Thread Re: [hennagaijin] Split MYSQL select results into 2 columns
vampy 6678 Oct 4, 2002, 7:12 AM
Thread Re: [vampy] Split MYSQL select results into 2 columns
hennagaijin 6688 Oct 4, 2002, 7:25 AM
Post Re: [hennagaijin] Split MYSQL select results into 2 columns
vampy 6622 Oct 4, 2002, 7:29 AM
Post Re: [hennagaijin] Split MYSQL select results into 2 columns
vampy 6622 Oct 4, 2002, 9:25 AM