ashii Posted August 13, 2009 Share Posted August 13, 2009 SELECT user.firstname, user.lastname, user.contact,user.address, user.email, vehicle_dtls.Vid,vehicle_dtls.name, vehicle_dtls.model, vehicle_dtls.seats FROM (user INNER JOIN vehicle_dtls ON user.ID = vehicle_dtls.ID)(vehicle_dtls INNER JOIN tbl_busimage ON vehicle_dtls.Vid= tbl_busimage.Vid) WHERE vehicle_dtls . route = 'USA-NEWYORK' Quote Link to comment https://forums.phpfreaks.com/topic/170035-solved-woz-wrong-in-this-inner-join-urgent-plz/ Share on other sites More sharing options...
aschk Posted August 13, 2009 Share Posted August 13, 2009 What's the error message? What data do you have? What data are you expecting? What is your schema layout? And as a prelude to you answering the questions above i've written out your query to be more readable (and it would appear i have also corrected your problem...) SELECT u.firstname ,u.lastname ,u.contact ,u.address ,u.email ,v.Vid ,v.name ,v.model ,v.seats FROM user u INNER JOIN vehicle_dtls v ON u.ID = v.ID INNER JOIN tbl_busimage b ON v.Vid= b.Vid WHERE v.route = 'USA-NEWYORK' Quote Link to comment https://forums.phpfreaks.com/topic/170035-solved-woz-wrong-in-this-inner-join-urgent-plz/#findComment-897091 Share on other sites More sharing options...
ashii Posted August 13, 2009 Author Share Posted August 13, 2009 Thank u vry mch.. i fixed it sum hw... since I waz vry Hurry to execute dis query. i dint post the needed info abuh da schema.. Quote Link to comment https://forums.phpfreaks.com/topic/170035-solved-woz-wrong-in-this-inner-join-urgent-plz/#findComment-897411 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.