MySQL Syntax error
#6

Quote:
Originally Posted by Patrick_
Посмотреть сообщение
No ' '(Apostophe) are used correctly, Apostophe are meant to be used only on string not on floats or integer. Also instead of putting 0 in arguements you could directly put zero in the query. something like this.

pawn Код:
mysql_format(szQuery, sizeof(szQuery), "INSERT INTO Tables (PlayerID, PlayerScore, PlayerMoney) VALUES(0, 0, 0) "
Complete
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, 200, 0, %f, %f, %f, 0, 0, 23, 0, 0, 0, 0, 0, 0, 255, 0, 0, '%s', 0, 0, 0, 0, 0, '%s', '%s', '%s')"
,
                name, //Username
                udb_hash(inputtext), //Password
                x, // posX
                y, // posY
                z, // posZ
                blankstring, //Blank title
                blankstring, //BannedBy
                blankstring, //reason
                blankstring //IP, blank because it will be assigned when player logs in.
                );
i am not good at mysql but just opened a gamemode of mysql and in that there is ' ' around every specifier in query why is that
and it works pretty good to with it
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)