query loads always same row
#1

pawn Код:
forward LoadPlayerKeys();
public LoadPlayerKeys()
{

    for(new i; i < MAX_PLAYER_VEHICLES; i++)
    {
        new query[100];
        new var[25] = "Mark";
        format(query, sizeof(query),"SELECT * FROM vehicles  WHERE owner='%s'",var);
        mysql_query(query);

        mysql_store_result();

        if(mysql_num_rows())
        if(mysql_fetch_row(query,"|"))
        {
            sscanf(query, "p<|>e<i>",playerkeys[i]);
            printf("keys loaded %d",playerkeys[i]);
            printf("%s",query);
        }
    }
}
What is wrong with this code? The query is always the same let me show you the output!

Quote:

[14:12:24] keys loaded 1
[14:12:24] 1|555|1|1|0|0|0|0|Mark|0|0|0
[14:12:24] keys loaded 1
[14:12:24] 1|555|1|1|0|0|0|0|Mark|0|0|0
[14:12:24] keys loaded 1
[14:12:24] 1|555|1|1|0|0|0|0|Mark|0|0|0
[14:12:24] keys loaded 1
[14:12:24] 1|555|1|1|0|0|0|0|Mark|0|0|0
[14:12:24] keys loaded 1
[14:12:24] 1|555|1|1|0|0|0|0|Mark|0|0|0

Reply


Messages In This Thread
query loads always same row - by BlackRaven - 29.01.2013, 12:52
Re: query loads always same row - by ReneG - 29.01.2013, 13:24
Re: query loads always same row - by BlackRaven - 29.01.2013, 13:49
Re: query loads always same row - by SuperViper - 29.01.2013, 14:18
Re: query loads always same row - by BlackRaven - 29.01.2013, 14:34
Re: query loads always same row - by BlackRaven - 30.01.2013, 09:00
Re: query loads always same row - by denNorske - 30.01.2013, 10:17
Re: query loads always same row - by BlackRaven - 30.01.2013, 10:33
Re: query loads always same row - by denNorske - 30.01.2013, 10:59
Re: query loads always same row - by BlackRaven - 30.01.2013, 11:08

Forum Jump:


Users browsing this thread: 1 Guest(s)