> > > I would give consideration to the 'group by' function for your query, and loop through that. Thanks Mike - will do... ---------- *beginner question* - what would we call this type of query/display: reporting or summary or ? I'm not sure what terms look up? it would be similar to query all categories and their products sold in a year and display like: summary heading1 CAT 1 sub head 1------- Prod 1 ----------- sales prod data 1 ----------- sales prod data 2 etc sub head 2------- Prod 2 ----------- sales prod data 3 ----------- sales prod data 4 etc summary heading2 CAT 2 sub head 3------- Prod 3 ----------- sales prod data 5 ----------- sales prod data 6 etc any other hints will help a lot... -- Thanks, Dave - DealTek dealtek@xxxxxxxxx [db-11] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php