CoCo-Corello
31/07/2012, 12:11 AM
Hey guys, I'm wonderin' if you can help me with something. I've tried three separate queries, each... Have their own issues.
format(bigstring, sizeof(bigstring), "SELECT ID,Username,Registered,FirstLogin,LastLogin,Regist eredIP,CharacterSlots,Banned,LastCreated,Muted FROM "SQL_ACC" WHERE Username = '%s'",GetName(playerid));
This one, works like a charm.
format(bigstring, sizeof(bigstring), "SELECT ID,Username,Registered,FirstLogin,LastLogin,Regist eredIP,CharacterSlots,Banned,LastCreated,Muted,Gro up FROM "SQL_ACC" WHERE Username = '%s'",GetName(playerid));
^ Simply adding ",Group" to the query causes this:
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
format(bigstring, sizeof(bigstring), "SELECT `ID`,`Username`,`Registered`,`FirstLogin`,`LastLog in`,`RegisteredIP`,`CharacterSlots`,`Banned`,`Last Created`,`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?
format(bigstring, sizeof(bigstring), "SELECT ID,Username,Registered,FirstLogin,LastLogin,Regist eredIP,CharacterSlots,Banned,LastCreated,Muted FROM "SQL_ACC" WHERE Username = '%s'",GetName(playerid));
This one, works like a charm.
format(bigstring, sizeof(bigstring), "SELECT ID,Username,Registered,FirstLogin,LastLogin,Regist eredIP,CharacterSlots,Banned,LastCreated,Muted,Gro up FROM "SQL_ACC" WHERE Username = '%s'",GetName(playerid));
^ Simply adding ",Group" to the query causes this:
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
format(bigstring, sizeof(bigstring), "SELECT `ID`,`Username`,`Registered`,`FirstLogin`,`LastLog in`,`RegisteredIP`,`CharacterSlots`,`Banned`,`Last Created`,`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?