mysql error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: mysql error (
/showthread.php?tid=177105)
mysql error -
Ribber - 16.09.2010
I have mysql errors by updating var's in loops..
Error & Debug log:
[13:37:21] [MySQL] Error (0): Failed to exeute 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 'W' at line 1.
[13:37:21] [MySQL] Error (0): Failed to exeute query. Unknown column 'na' in 'where clause'.
[13:37:21] [MySQL] Error (0): Failed to exeute 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 ''Shadow' = '0' WHERE name = 'Ribber'' at line 1.
[13:37:21] [DEBUG] UPDATE users SET 'Shadow' = '0' WHERE name = 'Ribber'
[13:37:21] [MySQL] Error (0): Failed to exeute 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 ''War Chief' = '0' WHERE name = 'Ribber'' at line 1.
[13:37:21] [DEBUG] UPDATE users SET 'War Chief' = '0' WHERE name = 'Ribber'
[13:37:21] [MySQL] Error (0): Failed to exeute 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 ''Blade Storm' = '1' WHERE name = 'Ribber'' at line 1.
[13:37:21] [DEBUG] UPDATE users SET 'Blade Storm' = '1' WHERE name = 'Ribber'
[13:37:21] [MySQL] Error (0): Failed to exeute 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 ''Sawblade' = '0' WHERE name = 'Ribber'' at line 1.
[13:37:21] [DEBUG] UPDATE users SET 'Sawblade' = '0' WHERE name = 'Ribber'
[13:37:21] [MySQL] Error (0): Failed to exeute 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 ''Unstoppable' = '1' WHERE name = 'Ribber'' at line 1.
[13:37:21] [DEBUG] UPDATE users SET 'Unstoppable' = '1' WHERE name = 'Ribber'
[13:37:22] [MySQL] Error (0): Failed to exeute 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 ''Ice-Cold' = '1' WHERE name = 'Ribber'' at line 1.
[13:37:22] [DEBUG] UPDATE users SET 'Ice-Cold' = '1' WHERE name = 'Ribber'
[13:37:22] [MySQL] Error (0): Failed to exeute 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 ''Explosive' = '1' WHERE name = 'Ribber'' at line 1.
[13:37:22] [DEBUG] UPDATE users SET 'Explosive' = '1' WHERE name = 'Ribber'
[13:37:22] [MySQL] Error (0): Failed to exeute 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 ''Silent Assassin' = '0' WHERE name = 'Ribber'' at line 1.
[13:37:22] [DEBUG] UPDATE users SET 'Silent Assassin' = '0' WHERE name = 'Ribber'
[13:37:22] [MySQL] Error (0): Failed to exeute 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 ''Cold-Blooded' = '0' WHERE name = 'Ribber'' at line 1.
[13:37:22] [DEBUG] UPDATE users SET 'Cold-Blooded' = '0' WHERE name = 'Ribber'
[13:37:22] [MySQL] Error (0): Failed to exeute 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 ''Hitman' = '0' WHERE name = 'Ribber'' at line 1.
[13:37:22] [DEBUG] UPDATE users SET 'Hitman' = '0' WHERE name = 'Ribber'
Console input: gmx
CODE:
pawn Код:
for(new title; title < sizeof(Titles); title++)
{
format(str, sizeof(str), "UPDATE users SET '%s' = %d WHERE name = '%s'", TitleNames[title], Titles[title][playerid], PlayerName(playerid));
mysql_query(str); //queries
printf("[DEBUG] %s",str);
}
To say is, when I log in the server with the updated stats, it work and it save my variables, so this problem comes only when I'm newly registered..
AW: mysql error -
Ribber - 16.09.2010
bump

btw: When i logged in and I changed my title vars via phpmyadmin to 1 it will be loaded, but it still comes these message when i save it. Not when I log in.
AW: mysql error -
Ribber - 17.09.2010
may anyone answer?