Originally Posted by Alexis1999
Thanks for replying. Although I'm pretty sure all the variables used to get from db_get_field_assoc have a defined value.
Here take a look.
Creating the table
pawn Код:
db_query(Database, "CREATE TABLE IF NOT EXISTS `ACCOUNTS` (`NAME`, `PASSWORD`, `MONEY` `FACTION`, `LEVEL`, `ADMINLEVEL`, `HELPER`, `DONATOR`, `MODERATOR`, `FRANK`, `SKIN`, `GENDER`, `AGE`)");
Inserting Values
pawn Код:
format(Query, sizeof(Query), "INSERT INTO `ACCOUNTS` (`NAME`, `PASSWORD`, `MONEY`, `FACTION`, `LEVEL`, `ADMINLEVEL`, `HELPER`, `DONATOR`, `MODERATOR`, `FRANK`) VALUES('%s', '%s', '4000', '-1', '0', '0', '0', '0', '0', '0')", DB_Escape(sCzName), DB_Escape(inputtext));
Money variable is defined above.
And for the skin, gender and age variables
pawn Код:
format(Query, sizeof(Query), "update `ACCOUNTS` set `SKIN` = '%i' where `NAME` = '%s'", DB_Escape(SkinID[playerid]), szName); format(Query, sizeof(Query), "UPDATE `ACCOUNTS` SET `AGE` = '%i' WHERE `NAME` = '%s' AND SET `GENDER` = '%s' WHERE `NAME` = '%s'", DB_Escape(AgeID[playerid]), szName, DB_Escape(GenderID), szName);
The problem only appeared when I attempted to grab those values from the DB.
|