Help MySQL
#18

For that use threaded queries:

pawn Code:
mysql_tquery(Database, "SELECT * FROM `dealerships`, "LoadDealerships", ""); // Call it separately, OnGameModeInit if you want to

pawn Code:
forward LoadDealerships();
public LoadDealerships()
{
    for (new i; i < MAX_DEALERSHIPS; i++)
    {
/*
        cache_get_value_name(row_idx, const column_name[], destination[], max_len = sizeof(destination)
        cache_get_value_name_bool(row_idx, column_name[], &bool:destination)
        cache_get_value_name_int(row_idx, const column_name[], destination)
        cache_get_value_name_float(row_idx, const column_name[], Float:destination)
*/

        cache_get_value_name(i, "dealership_name", DealershipStatistics[i][dealership_name]);
        // ...
    }
    return 1;
}
Reply


Messages In This Thread
Help MySQL - by KamilPolska - 01.11.2018, 12:55
Re: Help MySQL - by TheToretto - 01.11.2018, 13:13
Re: Help MySQL - by KamilPolska - 01.11.2018, 13:33
Re: Help MySQL - by TheToretto - 01.11.2018, 13:49
Re: Help MySQL - by KamilPolska - 01.11.2018, 13:51
Re: Help MySQL - by Heress - 01.11.2018, 14:16
Re: Help MySQL - by KamilPolska - 01.11.2018, 15:07
Re: Help MySQL - by TheToretto - 01.11.2018, 15:39
Re: Help MySQL - by KamilPolska - 01.11.2018, 15:48
Re: Help MySQL - by TheToretto - 01.11.2018, 16:15
Re: Help MySQL - by KamilPolska - 01.11.2018, 16:43
Re: Help MySQL - by TheToretto - 01.11.2018, 16:50
Re: Help MySQL - by KamilPolska - 01.11.2018, 17:11
Re: Help MySQL - by KinderClans - 01.11.2018, 17:20
Re: Help MySQL - by KamilPolska - 01.11.2018, 17:28
Re: Help MySQL - by TheToretto - 01.11.2018, 17:35
Re: Help MySQL - by KamilPolska - 01.11.2018, 18:13
Re: Help MySQL - by TheToretto - 01.11.2018, 19:18
Re: Help MySQL - by KamilPolska - 01.11.2018, 20:29
Re: Help MySQL - by TheToretto - 01.11.2018, 20:56
Re: Help MySQL - by KamilPolska - 01.11.2018, 21:07

Forum Jump:


Users browsing this thread: 1 Guest(s)