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. Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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.