[thelist] help w/design of SQL query

Tom Dell'Aringa pixelmech at yahoo.com
Thu Nov 14 17:03:00 CST 2002


I have a table that has items in it. Each item is tied to a
categoryID, which points to a category table. The categories are
dynamic, it can up and down, as are the items.

I want to pull all the items and list them by category. I.e.:

Category 1:
Item 1 in cat 1
Item 2 in cat 1

Category 2:
Item 1 in cat 2 etc.

What is the best way to approach this? Do I pull everything at once
first, then do the logic? Or do I pull the number of categories first
then do queries based on the number of those?

A head start on the SQL would be great - I'm very rusty at it and was
never very good at it to start! ;) This is a mySQL db.

TIA

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com



More information about the thelist mailing list