MySQL Syntax error
#1

Okay, I've been using MySQL for nearly a month but the syntax still throws me. When a player registers it gives out the following error:
pawn Код:
[ERROR] CMySQLQuery::Execute[] - (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 '' at line 1
The query I'm trying to execute...
pawn Код:
mysql_format(MySQL, query, sizeof(query), "INSERT INTO `accounts` (Username, Password, Money, Score, posX, posY, posZ, Admin, Skin, Age, Sex, Interior, VirtualWorld, CellNum, Job, Accent, Faction, Hospital, Insurance, Title, TitleEnabled, Developer, VIP, Credits, Banned, BannedBy, Reason, Ip) \
                VALUES ('%s', %i, %i, %i, %f, %f, %f, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, '%s', %d, %d, %d, %d, %d, '%s', '%s', '%s')"
,
                name, //Username
                udb_hash(inputtext), //Password
                200, //Cash
                0, //Score
                x, // posX
                y, // posY
                z, // posZ
                0, //Admin check.
                0, //Skin
                23, //Age
                0, //Gender (Male)
                0, //Interior
                0, //VirtualWorld
                0, //Cellnum
                0, //Job
                0, //Accent
                255, //INVALID_FACTION_ID
                0, //Hospital
                0, //Insurance
                blankstring, //Blank title
                0, //Title Enabled
                0, //Developer Status
                0, //VIP Status
                0, //Credits
                0, //Banned is 0.. Obviously
                blankstring, //BannedBy
                blankstring, //reason
                blankstring //IP, blank because it will be assigned when player logs in.
                );
I know it's messy... It worked up until now.
Any help is appreciated
Reply


Messages In This Thread
MySQL Syntax error - by Jacksta21 - 31.05.2014, 14:24
Re: MySQL Syntax error - by Misiur - 31.05.2014, 14:37
Re: MySQL Syntax error - by Jacksta21 - 31.05.2014, 14:44
Re: MySQL Syntax error - by BroZeus - 31.05.2014, 15:08
Re: MySQL Syntax error - by Patrick - 31.05.2014, 15:17
Re: MySQL Syntax error - by BroZeus - 31.05.2014, 15:21
Re: MySQL Syntax error - by Misiur - 31.05.2014, 15:23
Re: MySQL Syntax error - by iZN - 31.05.2014, 15:25
Re: MySQL Syntax error - by Vince - 31.05.2014, 17:14

Forum Jump:


Users browsing this thread: 1 Guest(s)