I am trying to figure out something, but I don't know what to search for to looks for solutions. Firstly, I have a SQL database, surprised? However, I want to arrange the results in a format that I want to. I have three main categories and a half dozen to dozen sub categories that the results must be put into.
I don't want to run the SQL Query 20 times, with certainty that it will keep expanding. The order of these categories are in an arbitrary order, at least to the SQL server, so I can't simply use ORDER BY. Without getting too involved, the order is like:
Group Blah
Cat kkej
Cat spa
Cat psn
Cat scr
Group Ni
Cat wad
Cat ape
Group Heya
Cat poe
Cat cvwu
Each record does contain varchar fields on what Group and Cat they belong in. Is there any way that I can easily get this done? Or is there going to be a lot of PHP code involved?
I was thinking there could be a way to reQuery the results, like using a SQL Query, but instead of going into a table, to go through the returned array. But it doesn't like that. Can anyone point me in the right direction? Thank you.
Aqua-Soft Forums