VB.NET

Moderators: seancampbell
Number of threads: 3871
Number of posts: 9837

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
MYSQL INNER JOIN Posted by azdonald on 25 Nov 2009 at 7:24 AM
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
Report
Re: MYSQL INNER JOIN Posted by seancampbell on 1 Dec 2009 at 8:47 AM
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
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



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
Report
This post has been deleted. Posted by salsan on 30 Apr 2010 at 10:20 AM
This post has been deleted.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.