Mysql / sscanf problem
#5

Quote:
Originally Posted by pds2012
View Post
Try these

pawn Code:
new Query[512];
for(new i; i < MAX_HOUSES; i++) // Goes through all the slots, looking for the data
{
    HouseCount = 0;
    format(Query,sizeof(Query),"SELECT * FROM houses WHERE Created = %d", i);//searching for the house id and load it
    mysql_query(Query);
    mysql_store_result();
    while(mysql_fetch_row(Query))
    {
        sscanf(Query,"e<p<|>s[32]ddddfffdds[128]s[128]d>",HInfo[i]); //i = MAX_HOUSES
        HouseCount++;
    }
}
The problem is this HInfo[HouseCount]
Thanks for the reply
I tried it, but now it's just trying to load house 1 like, a hundred times :P. HouseCount has no defined size, and increases each the while loop loops, so I don't think that's the problem.
Reply


Messages In This Thread
Mysql / sscanf problem - by Jstylezzz - 13.10.2013, 10:31
Re: Mysql / sscanf problem - by iZN - 13.10.2013, 10:40
Re: Mysql / sscanf problem - by Jstylezzz - 13.10.2013, 10:41
Re: Mysql / sscanf problem - by Patrick - 13.10.2013, 10:44
Re: Mysql / sscanf problem - by Jstylezzz - 13.10.2013, 10:49
Re: Mysql / sscanf problem - by Jstylezzz - 14.10.2013, 12:26
Re: Mysql / sscanf problem - by Misiur - 14.10.2013, 12:38
Re: Mysql / sscanf problem - by Jstylezzz - 14.10.2013, 13:12

Forum Jump:


Users browsing this thread: 1 Guest(s)