MySQL Issue
#1

Hey guys, I'm wonderin' if you can help me with something. I've tried three separate queries, each... Have their own issues.

pawn Код:
format(bigstring, sizeof(bigstring), "SELECT ID,Username,Registered,FirstLogin,LastLogin,RegisteredIP,CharacterSlots,Banned,LastCreated,Muted FROM "SQL_ACC" WHERE Username = '%s'",GetName(playerid));
This one, works like a charm.

pawn Код:
format(bigstring, sizeof(bigstring), "SELECT ID,Username,Registered,FirstLogin,LastLogin,RegisteredIP,CharacterSlots,Banned,LastCreated,Muted,Group FROM "SQL_ACC" WHERE Username = '%s'",GetName(playerid));
^ Simply adding ",Group" to the query causes this:

Quote:

Error ID: 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 'Group FROM Accounts WHERE `Username` = 'Corello'' at line 1

pawn Код:
format(bigstring, sizeof(bigstring), "SELECT `ID`,`Username`,`Registered`,`FirstLogin`,`LastLogin`,`RegisteredIP`,`CharacterSlots`,`Banned`,`LastCreated`,`Muted`,`Group` FROM "SQL_ACC" WHERE Username = '%s'",GetName(playerid));
^ Works, but it causes the script to freeze and doesn't load the next line of code.

Ideas?
Reply


Messages In This Thread
MySQL Issue - by CoCo-Corello - 31.07.2012, 00:11
Re: MySQL Issue - by Revo - 31.07.2012, 00:17
Re: MySQL Issue - by CoCo-Corello - 31.07.2012, 00:20

Forum Jump:


Users browsing this thread: 2 Guest(s)