Hi,
Am having a bit of logic problem figuring this out....I just think the easy
solution would cost me in having too many
sql queries from my script so there has to be a easier way.


I am allowing our members to upload pictures and they can choose which
category the pictures go under,
the first category "public" is made for them.

When I sql the DB I call it like this: select picture_names<,more fields>
from <table> where member_id=<x> order by category.

which i display something like this:
__________________________________
| pic-here | <some text here> | category here|
| pic-here | <some text here> | category here|
| pic-here | <some text here> | category here|
| pic-here | <some text here> | category here|
---------------------------------------------

how can i display it like this:

__________________________________
category here                                                |
---------------------------------------------
| pic-here | <some text here>                         |
| pic-here | <some text here>                         |
| pic-here | <some text here>                         |
__________________________________
category here                                                |
---------------------------------------------
| pic-here | <some text here>                         |
| pic-here | <some text here>                         |
---------------------------------------------

I thought of just getting the categories into an array and then sqling on
each category but if
there are 30 user defined categories that would mean 30 queries....
Another more complicated way would be to get all the records and sort them
into arrays via
categories and child arrays...I just feel this is too complicated for the
above job.

What am I missing?

Thanks,
Ryan



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 4/20/2005

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to