AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   MySQL syntax error - single quote ` (https://forums.alliedmods.net/showthread.php?t=236799)

fcastro16 03-11-2014 10:56

MySQL syntax error - single quote `
 
This line is giving me an error:
PHP Code:

formatex(szQuerycharsmax(szQuery), "REPLACE INTO `cuentas` ( `nick`, `steamID`, `frags`, `nivel` ) VALUES ( ^"%s^", ^"%s^", '%d', '%d' );"SZ_NameSZ_SteamIDg_frags[id], g_level[id] ); 

To my understanding, the ^"%s^" should make it work, but I keep the following error.

Quote:

L 03/11/2014 - 09:54:38: [gdlcuentasv2.amxx] 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 ''' at line 1
L 03/11/2014 - 09:55:04: [gdlcuentasv2.amxx] 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 ''' at line 1

YamiKaitou 03-11-2014 11:01

Re: MySQL syntax error - single quote `
 
See if removing the quotes around the %d helps. If it doesn't, then print the complete SQL line into your console and debug it with phpMyAdmin or something

fcastro16 03-11-2014 11:24

Re: MySQL syntax error - single quote `
 
same :/

YamiKaitou 03-11-2014 11:25

Re: MySQL syntax error - single quote `
 
Quote:

Originally Posted by YamiKaitou (Post 2110428)
then print the complete SQL line into your console and debug it with phpMyAdmin or something



All times are GMT -4. The time now is 06:03.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.