mysql query Syntax error

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
DavJans
Posts: 275
Joined: Thu Dec 12, 2013 4:21 pm

mysql query Syntax error

Post by DavJans » Sat Dec 14, 2013 12:06 am

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
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

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

Re: mysql query Syntax error

Post by SparkOut » Sat Dec 14, 2013 12:32 am

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.

DavJans
Posts: 275
Joined: Thu Dec 12, 2013 4:21 pm

Re: mysql query Syntax error

Post by DavJans » Sat Dec 14, 2013 12:55 am

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
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

Post Reply