Three tables linked via JOIN

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Borkovec
Posts: 2
Joined: Thu Feb 05, 2015 11:54 am

Three tables linked via JOIN

Post by Borkovec » Thu Feb 05, 2015 12:04 pm

Hey, when joining multiple tables in SQL JOIN, an error occurs.
syntax to use near '((FROM SeznamHW...
MySQL

Code: Select all

 put "SELECT * ((FROM SeznamHW JOIN Firmy ON Firmy.ID = SeznamHW.IDFirma) JOIN Pracoviste ON Pracoviste.ID = SeznamHW.ID-Pracoviste)" into tSQL
put revDataFromQuery(tab, cr, gConnectionID, tSQL) into tData 
Thanks for your help
Vojta.

SparkOut
Posts: 2862
Joined: Sun Sep 23, 2007 4:58 pm

Re: Three tables linked via JOIN

Post by SparkOut » Thu Feb 05, 2015 1:12 pm

Unable to test, and only a quick glance at the code, but perhaps move FROM outside the parentheses

Borkovec
Posts: 2
Joined: Thu Feb 05, 2015 11:54 am

Re: Three tables linked via JOIN

Post by Borkovec » Thu Feb 05, 2015 1:24 pm

Parentheses are good by a SQL command that works over PhP admin in mySQL.
Join two tables with a JOIN, where they are not needed parentheses, works well.
I have not found anywhere in the documentation LiveCode example of a more tables via SQL.
Does anyone know why it does not work?
Thank you ,Vojta.

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Re: Three tables linked via JOIN

Post by phaworth » Thu Feb 05, 2015 7:47 pm

Remove all the parentheses. They mightbe needed in phpadmin but your SELECT statement is invalid when executed as is..

Post Reply

Return to “Databases”