10.01.2018, 16:25
You should update to the R40 version, you can follow my tutorial if you wish. Nowadays the MySQL plugin uses threaded queries, the functions are mysql_tquery and mysql_pquery. Queries sent with mysql_tquery are queued and they execute in the order you send them. On the other hand, mysql_pquery queries run at once.
Despite the above, you can still use unthreaded queries making use of mysql_query. In my opinion, you shoud use threaded queries along with the cache functions.
PHP код:
// mysql_tquery
mysql_tquery(db_handle, "SELECT * FROM `vehicles`", OnVehiclesLoad); // The vehicles load first.
mysql_tquery(db_handle, "SELECT * FROM `houses`", OnHousesLoad); // The houses load after the vehicles.
PHP код:
// mysql_pquery
mysql_pquery(db_handle, "SELECT * FROM `vehicles`", OnVehiclesLoad);
mysql_pquery(db_handle, "SELECT * FROM `houses`", OnHousesLoad);
// In this case the houses might load before the vehicles, you can't control the execution order here.