Pitipaty
Pitipaty

Reputation: 329

MySQL #1064 syntax error

This is my query:

INSERT INTO exp_pdata ( steam, exp, curlevel, nextlevel, levelnum, corbarraxp ) VALUES(STEAM:O_O_O, 0, 0, 500, 1, 1);

I get this error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':O_O_O, 0, 0, 500, 1, 1)' at line 1 

I tried to search for this but didn't find what is causing this error,
Thanks for reading

Upvotes: 0

Views: 68

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1271051

Presumably, you want the value as a string:

INSERT INTO exp_pdata ( steam, exp, curlevel, nextlevel, levelnum, corbarraxp )
    VALUES('STEAM:O_O_O', 0, 0, 500, 1, 1);

You need to include single quotes to delimit the value.

Upvotes: 2

Related Questions