RE: [PHP] php/mysql data display
| From: | Jay Blanchard | Date: | Wed, 17 Dec 2003 20:47:55 +0000 |
| Subject: | RE: [PHP] php/mysql data display | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-172904@lists.php.net to get a copy of this message | ||
[snip]
Data is as such right now for testing purposes:
ID, catName, catLink, catDepartment.
I will have multiple instances of the same text in catDepartment. I
realize
this is a fopaux. I'm just trying to do a quick fix.
none the less I want the data formatted like this:
DEPARTMENT NAME 1(catDepartment) DEPARTMENT
NAME...n(catDepartment)
--------------------------------------------
-------------------------
--------------------
Category1(catName)
Category1(catName)
Category2(catName)
Category2(catName)
Category...n(catName)
Category...n(catName)
[/snip]
You need a crosstab query in SQL. Please search google for "crosstab
query".