jamesxg1 Posted December 8, 2010 Share Posted December 8, 2010 Hiya peeps, I have been sent this today; select company_map.*, map.*,addresses.address,addresses.nomitative,addresses.number, c.postcode from company_map join map on map.id=company_map.map_id join company c on c.company_id=company_map.company_id join addresses on addresses.address_id=c.address_id where company_map.company_id='79' and company_map.ui_shell_id <> 0 and language_id='en' when I print all the results from this I get a postcode, I was wondering if anyone could read this code and simplify it for me, I really need to know what table this query is pulling the postcode from. Many many thanks, James. Link to comment https://forums.phpfreaks.com/topic/221074-im-so-confused-where-is-this-query-pulling-information-from/ Share on other sites More sharing options...
BlueSkyIS Posted December 8, 2010 Share Posted December 8, 2010 select ... c.postcode from ... company c the table company Link to comment https://forums.phpfreaks.com/topic/221074-im-so-confused-where-is-this-query-pulling-information-from/#findComment-1144718 Share on other sites More sharing options...
jamesxg1 Posted December 8, 2010 Author Share Posted December 8, 2010 You are a STAR! There isn't an avatar for a star but if there was it's yours! Thanks buddy much appreciated. Many many thanks, James. Link to comment https://forums.phpfreaks.com/topic/221074-im-so-confused-where-is-this-query-pulling-information-from/#findComment-1144719 Share on other sites More sharing options...
jamesxg1 Posted December 8, 2010 Author Share Posted December 8, 2010 Sorry, I need to change it from company to addresses how would I go about this =/ Many thanks, James. Link to comment https://forums.phpfreaks.com/topic/221074-im-so-confused-where-is-this-query-pulling-information-from/#findComment-1144720 Share on other sites More sharing options...
BlueSkyIS Posted December 8, 2010 Share Posted December 8, 2010 change c.postcode to addresses.postcode i assume there is a field called postcode in the addresses table. Link to comment https://forums.phpfreaks.com/topic/221074-im-so-confused-where-is-this-query-pulling-information-from/#findComment-1144721 Share on other sites More sharing options...
jamesxg1 Posted December 8, 2010 Author Share Posted December 8, 2010 There is yes Thank you very much BlueSkyIS, your help has been very much appreciated. Many thanks, James. Link to comment https://forums.phpfreaks.com/topic/221074-im-so-confused-where-is-this-query-pulling-information-from/#findComment-1144722 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.