Page 1 of 1

mysql query Syntax error

Posted: Sat Dec 14, 2013 12:06 am
by DavJans
I've spend 2 hours trying to find the right syntax and everything has failed or led me to believe this is correct...

Code: Select all

put "SELECT * FROM " & tTableName & "WHERE tcertn = " & tCertN & ";" into tSQL
put revDataFromQuery(Tab, cr, gConnectionID, tSQL) into tData
The error I'm getting wants the right syntax near '= 3'

tCertN = 3

Re: mysql query Syntax error

Posted: Sat Dec 14, 2013 12:32 am
by SparkOut
Put tSQL before running the query and check it looks ok. It looks like you need a space after the tTablename variable and before the WHERE to me. You could also check that the SQL query really needs the trailing semicolon.

Re: mysql query Syntax error

Posted: Sat Dec 14, 2013 12:55 am
by DavJans
Thank you, getting rid of the ; fixed it

I had a space before the WHERE in my code but forgot it when I retyped the code here on the forum