Jump to content

[HELP]Wrong mysql syntax


milkshake333

Recommended Posts

Posted

insertToDB = "INSERT INTO vehshop (vehid, price, group, type) VALUES('" .. vehid .. "', '" .. price .. "', '" .. tostring(theGroup) .. "', '" .. tostring(theType) .. "')" 
  

It returns the error that there's an error in my syntax. What's wrong with it, I don't see nothing wrong.

Posted

its also saying where you make a mistake.

if your query have variables its good to display it before looking for errors

outputDebugString(insertToDB) and looks for errors.

the error is that "group" is mysql reserved word. add ` around reserved words if you want to use them as column names

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...