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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.