BillyMako Posted December 2, 2008 Share Posted December 2, 2008 What i want to do is display all the customers data which is in the 'customers' table where their 'customers_id' is NOT IN the 'customers_id' field in the 'orders' table. I hope i made sense! Thanks, Billy Link to comment https://forums.phpfreaks.com/topic/135102-display-customer-data-which-is-not-in-other-table/ Share on other sites More sharing options...
Cosizzle Posted December 2, 2008 Share Posted December 2, 2008 SELECT c.customers_id, o.customers_id FROM customers c OUTER JOIN orders o ON (c.customers_id = o.customers_id) WHERE o.customers_id IS NOT NULL Try that Link to comment https://forums.phpfreaks.com/topic/135102-display-customer-data-which-is-not-in-other-table/#findComment-703789 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.