28.07.2013, 13:56
(
Last edited by HitnKill; 30/07/2013 at 02:21 PM.
)
Wow this plugin it's very interesting because i have MYSQL R6 and it's too long to update on R7 or more with my all query SELECT
The Query non threaded and cached is more fast than MYSQL R6 ?
I can have more example querys non threaded and cached?
What is
The Query non threaded and cached is more fast than MYSQL R6 ?
I can have more example querys non threaded and cached?
PHP Code:
new Result:vehicles = sql_query(conn, "SELECT * FROM vehicles", QUERY_CACHED);
// using cache, even though this is a non-threaded query ^
// awesome or what?
for (new i = 0, rows = sql_num_rows(vehicles); i != rows; ++i) {
new vehicle[eVehicle];
vehicle[vId] = sql_get_field_assoc_int(vehicles, "id");
vehicle[vModelID] = sql_get_field_assoc_int(vehicles, "modelid");
vehicle[vColor1] = sql_get_field_assoc_int(vehicles, "color1");
vehicle[vColor2] = sql_get_field_assoc_int(vehicles, "color2");
vehicle[vPos][0] = sql_get_field_assoc_float(vehicles, "pos_x");
vehicle[vPos][1] = sql_get_field_assoc_float(vehicles, "pos_y");
vehicle[vPos][2] = sql_get_field_assoc_float(vehicles, "pos_z");
vehicle[vPos][3] = sql_get_field_assoc_float(vehicles, "rot");
sql_next_row(vehicles);
}
sql_free_result(vehicles);
PHP Code:
sql_next_row(vehicles);