Hi sounds like you should be doing a JOIN on the tables to get what you want SELECT * FROM table1 LEFT JOIN table2 ON id = contact_id WHERE cat_id=10 then use a loop to retrieve/print each row, ignoring the duplicated data on the 2nd and successive iterations Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php