Re: [PHP-DB] Trying to figure out the best way to get and output data

2005-01-11 Thread Chris
It can be done in one query. Just join the two tables, and do a single loop through that query, printing out each row. When you reach a new category, display it. Something like this: $iCategoryID = -1; while($aRow = ...) { if($iCategoryID != $aRow['iCategoryID']) { echo '[',$aRow['s

[PHP-DB] Trying to figure out the best way to get and output data

2005-01-11 Thread Seona Bellamy
Hi guys, I'm relatively new to php, and am pretty much trying to learn as I go along. I've been struggling to get my head around this problem for a day and half, so I'm hoping that someone with more familiarity with the language can help me. I have the following two tables: CATEGORY - I