Script won't load to much mysql data.
#5

Do not call for loop mysql_function_query!

Try:
pawn Код:
stock InitFactions()
{
    mysql_function_query(connectionHandle, "SELECT * FROM `Factions`", true, "LoadFactionsCallback", "d", id); // Select all data in Factions table
}

forward LoadFactionsCallback(); public LoadFactionsCallback()
{
    new
        rows,
        fields;
    cache_get_data(rows, fields); // Get mysql data rows
   
    if(rows == 0) return print("Error -> empty database!");
    if(rows > MAX_FACTIONS) return print("Error -> too many data row!");
   
    for(new id; id < MAX_FACTIONS; id++)
    {      
        blabla[id][FactionID] = cache_get_row_int(id, 0);
        blabla[id][bla2] = cache_get_row_int(id, 1);
        blabla[id][bla3] = cache_get_row_float(id, 2);
        blabla[id][bla4] = cache_get_row_float(id, 3);
    }
    return 0;
}
Reply


Messages In This Thread
Script won't load to much mysql data. - by Stefand - 10.05.2013, 09:08
Re: Script won't load to much mysql data. - by [MG]Dimi - 10.05.2013, 09:10
Re: Script won't load to much mysql data. - by Stefand - 10.05.2013, 09:29
Re: Script won't load to much mysql data. - by [MG]Dimi - 10.05.2013, 09:33
Re: Script won't load to much mysql data. - by smeti - 10.05.2013, 09:35
Re: Script won't load to much mysql data. - by [MG]Dimi - 10.05.2013, 09:40
Re: Script won't load to much mysql data. - by [KHK]Khalid - 10.05.2013, 09:51
Re: Script won't load to much mysql data. - by Stefand - 10.05.2013, 09:53
Re: Script won't load to much mysql data. - by Stefand - 10.05.2013, 09:56
Re: Script won't load to much mysql data. - by smeti - 10.05.2013, 13:59

Forum Jump:


Users browsing this thread: 2 Guest(s)