Re: [PHP-DB] Looping through a result

2004-04-20 Thread Ignatius Reilly
Use only one query: SELECT category, item, ... ORDER BY category, item Now fetch rows, and keep the latest categoryID in a flag variable: - if fetched categoryID flag, close table, create a new table, add header row - otherwise add content row to the current table - update flag with the latest

Re: [PHP-DB] Looping through a result

2004-04-20 Thread Mikael Grön
Rene, This is a clarification of what I think Ignatius was talking about. I did like this on www.deep-purple.com/tourdates: Your database structure must look something like this for it to work: ID ITEMCATEGORY 1 1 1 2 2 1 3 3