Raised This Month: $32 Target: $400
 8% 

MySQL syntax error - single quote `


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fcastro16
Member
Join Date: Mar 2009
Old 03-11-2014 , 10:56   MySQL syntax error - single quote `
Reply With Quote #1

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:548: [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

Last edited by fcastro16; 03-11-2014 at 11:01.
fcastro16 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-11-2014 , 11:01   Re: MySQL syntax error - single quote `
Reply With Quote #2

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
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fcastro16
Member
Join Date: Mar 2009
Old 03-11-2014 , 11:24   Re: MySQL syntax error - single quote `
Reply With Quote #3

same :/
fcastro16 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-11-2014 , 11:25   Re: MySQL syntax error - single quote `
Reply With Quote #4

Quote:
Originally Posted by YamiKaitou View Post
then print the complete SQL line into your console and debug it with phpMyAdmin or something
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:33.


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