Error in SAMP MySQL
#1

Help! On create account in game - error:

"Error in mysql_query: 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 'Key) VALUES ('MyNickName', 'MyPass')' at line 1"
Reply
#2

show your query
Reply
#3

format(query, sizeof(query), "INSERT INTO players (Name, Key) VALUES ('%s', '%s')", sqlplyname, sqlpassword);
samp_mysql_query(query);
Reply
#4

Print out the formated query before executing it.
Reply
#5

Код:
[17:39:30] [join] Archangel has joined the server (0:169.254.195.247)
[17:39:30] SELECT id FROM players WHERE LOWER(Name) = LOWER('') LIMIT 1
[17:39:37] Error in mysql_query: 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 'Key) VALUES ('Archangel', 'tgut')' at line 1
[17:39:37] SELECT id FROM players WHERE LOWER(Name) = LOWER('Archangel') LIMIT 1
[17:39:37] INSERT INTO players (Name, Key) VALUES ('Archangel', 'tgut')
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)