BillyMako Posted December 3, 2008 Share Posted December 3, 2008 I need to get the 'customers_info_date_account_created' from the 'customers_info' table where the field 'customers_info_id' matches with the field 'customers_id' in the following query: SELECT * FROM customers WHERE customers_id NOT IN( SELECT customers_id FROM orders ) I basically have all the information in columns from the query and need an extra field which has the 'customers_info_date_account_created' which is related to the 'customers_id' Quote Link to comment https://forums.phpfreaks.com/topic/135291-solved-get-customers_info_date_account_created/ Share on other sites More sharing options...
dclamp Posted December 3, 2008 Share Posted December 3, 2008 Im not really sure if there was a question in there, or you just telling us random things... Quote Link to comment https://forums.phpfreaks.com/topic/135291-solved-get-customers_info_date_account_created/#findComment-704726 Share on other sites More sharing options...
BillyMako Posted December 3, 2008 Author Share Posted December 3, 2008 The date i need to get is in the 'customers_info' table and i need to get it using the customers_id which i get from the following querry: SELECT * FROM customers WHERE customers_id NOT IN( SELECT customers_id FROM orders ) Quote Link to comment https://forums.phpfreaks.com/topic/135291-solved-get-customers_info_date_account_created/#findComment-705500 Share on other sites More sharing options...
BillyMako Posted December 3, 2008 Author Share Posted December 3, 2008 Here is a diagram explaining what i need to do. Quote Link to comment https://forums.phpfreaks.com/topic/135291-solved-get-customers_info_date_account_created/#findComment-705513 Share on other sites More sharing options...
fenway Posted December 4, 2008 Share Posted December 4, 2008 NOT IN? Use a left join instead. Quote Link to comment https://forums.phpfreaks.com/topic/135291-solved-get-customers_info_date_account_created/#findComment-706179 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.