MYSQL INNER JOIN

Please can i have multiple innner join statements in mysql??
tried to combine two but got a syntax error.
this is a sample of what i did

SELECT invoice.transid. invoice.airline, invoice.agent, airline.name, agent.name from invoice INNER JOIN airline, agent
WHERE invoice.airline=airline.name and invoice.agent=agent.name

Comments

  • seancampbellseancampbell Pennsylvania, USA
    Just double checked the syntax here by looking at an example here: http://www.plus2net.com/sql_tutorial/sql_inner_join.php

    You had a period after Invoice.transid instead of a comma
    [code]
    SELECT invoice.transid, invoice.airline, invoice.agent, airline.name, agent.name FROM invoice INNER JOIN airline ON invoice.airline = airline.name INNER JOIN agent ON invoice.agent = agent.name

    [/code]

    SELECT Fields FROM Table1 INNER JOIN Table2 ON Table1.Value = Table2.Value WHERE (Conditions pertaining to any table's values)

    I removed the WHERE clause because it pertained to what you wanted your Inner Joins to do
  • This post has been deleted.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories