24.02.2014, 16:25
Ok so i have the following DB
id|Name|Password|Admin|Money|LastLogin|Banned|BanT ime|MotivBan
and this code
and the spliting
Strangely it outputs me
Here is the data in the DB
id|Name|Password|Admin|Money|LastLogin|Banned|BanT ime|MotivBan
and this code
pawn Код:
enum PlayerInfo
{
id, // integer
Name[24],
Password[24],
Admin,
Money,
LastLogin[24],
Banned, // integer 1 or 0
BanTime, // string , as day/month/year/hour/minute
MotivBan, // reason for ban , string
}
new PInfo[MAX_PLAYERS][PlayerInfo];
pawn Код:
format(Query, sizeof(Query), "SELECT * FROM `Users` WHERE `Name` = '%s' ", pName);
mysql_query(1,Query);
mysql_store_result();
mysql_fetch_row_format(Query, "|");
sscanf(Query, "e<p<|>is[24]s[24]iis[24]is[24]s[24]>", PInfo[playerid]);
printf("%s",PInfo[playerid][MotivBan]);
Код:
[07:17:46] 5/2/2015/5/3