MySQL Query result is different than printed - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Query result is different than printed (
/showthread.php?tid=481459)
MySQL Query result is different than printed -
FalconWingsX - 15.12.2013
So, I have a table value Members which is 1. But when I load the row which includes the members value, it is 0.
Enums
pawn Код:
enum faction
{
SQLID,
Name[64],
Type,
Rank[32],
Rank2[32],
Rank3[32],
Rank4[32],
Rank5[32],
Rank6[32],
Rank7[32],
Rank8[32],
Rank9[32],
Rank10[32],
Rank11[32],
Rank12[32],
Rank13[32],
Float:Intx,
Float:Inty,
Float:Intz,
Float:Inta,
Interior,
World,
Members[MAX_PLAYERS]
};
This is the query
pawn Код:
if(mysql_fetch_row_format(query,"|"))
{
sscanf(query, "p<|>e<is[64]ds[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]fffiiid>",Factions[id]);
This is what it returns from the tables
Код:
CMySQLHandler::FetchRow() - Return: 1|Mafia||1st - Lowest Rank|2nd Rank|3rd Rank|4th Rank|5th Rank|6th Rank|7th Rank|8th Rank|9th Rank|10th Rank|11th Rank|12th Rank|13th - Highest Rank|0|0|0|0|69|23|1
This is what the
factions[id][Members], World and Interior return
While the actual values should be Int: 69 World: 23 And Members: 1
Код:
[21:14:50] > 1 factions have been loaded from the database.
[21:14:50] > 0 Members in faction ID: 1
[21:14:50] > 0 Int in faction ID: 1
[21:14:50] > 0 World in faction ID: 1
Re: MySQL Query result is different than printed -
FalconWingsX - 15.12.2013
Aand this can be deleted, didn't notice that I had the "Type" as an Varchar in the Database