MySQL no load [REP+]
#1

Hello,

Today I have a problem I explain:
My load is not executes if id 1 is not present, and even if eg id 1 and present but is followed by the id 20, so the id 20 is not going to charge this but only id 1.

Код:
	SA-MP MySQL plugin R5
	Copyright © 2008-2010, G-sTyLeZzZ
Here is my code:
pawn Код:
public Shop_load()
{
    new Requete[504], fields[57][MAX_PLAYER_NAME], row[320];

    format(Requete, sizeof(Requete), "SELECT COUNT(*) FROM shop");
    mysql_query(Requete);
    mysql_store_result();
    mysql_fetch_row(row);
    Total_shop = strval(row);
    mysql_free_result();

    for(new i=1; i<=Total_shop; i++)
    {
        format(Requete, sizeof(Requete), "SELECT * FROM shop WHERE id=%d", i);
        mysql_query(Requete);
        mysql_store_result();
        mysql_fetch_row(row);
        split(row, fields, '|');

        Shop_infos[i][shopX] = floatstr(fields[1]); printf(">   %f      !shopX", Shop_infos[i][shopX]);
        Shop_infos[i][shopY] = floatstr(fields[2]);
        Shop_infos[i][shopZ] = floatstr(fields[3]);
        Shop_infos[i][shopXexit] = floatstr(fields[4]);
        Shop_infos[i][shopYexit] = floatstr(fields[5]);
        Shop_infos[i][shopZexit] = floatstr(fields[6]);
        Shop_infos[i][shopCaisse] = strval(fields[7]);
        Shop_infos[i][shopInterieur] = strval(fields[8]);
        Shop_infos[i][shopLock] = strval(fields[9]);

        mysql_free_result();
    }
    printf(">   %d shop load        !", Total_shop);
    return 1;
}
Sincerely,
Drek.
Reply


Messages In This Thread
MySQL no load [REP+] - by Drek - 19.05.2015, 08:31
Re: MySQL no load - by RaeF - 19.05.2015, 08:36
Re : MySQL no load - by Drek - 19.05.2015, 08:37
Re : MySQL no load [REP+] - by Drek - 20.05.2015, 08:31
Re : MySQL no load [REP+] - by Drek - 22.05.2015, 07:37
Re: MySQL no load [REP+] - by rappy93 - 22.05.2015, 11:47
Re: MySQL no load [REP+] - by LMaxCo - 22.05.2015, 11:54
Re: MySQL no load [REP+] - by Matess - 22.05.2015, 12:19
Re : MySQL no load [REP+] - by Drek - 24.05.2015, 12:42
Re : MySQL no load [REP+] - by Drek - 26.05.2015, 10:44

Forum Jump:


Users browsing this thread: 1 Guest(s)