Jump to content

[SOLVED] Woz Wrong in this Inner Join... Urgent Plz....!!!!!!


ashii

Recommended Posts

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'

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'

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.