01.04.2011, 15:19
Код:
[17:20:11] --------------------------- [17:20:11] MySQL Debugging activated (04/01/11) [17:20:11] --------------------------- [17:20:11] [17:20:11] >> mysql_query( Connection handle: 1 ) [17:20:11] CMySQLHandler::Query(SELECT * FROM `orgvehs`) - Successfully executed. [17:20:11] >> mysql_store_result( Connection handle: 1 ) [17:20:11] CMySQLHandler::StoreResult() - Result was stored. [17:20:11] >> mysql_retrieve_row( Connection handle: 1 ) [17:20:11] >> mysql_num_rows( Connection handle: 1 ) [17:20:11] CMySQLHandler::NumRows() - Returned 3 row(s) [17:20:11] >> mysql_fetch_row_format( Connection handle: 1 ) [17:20:11] CMySQLHandler::FetchRow() - Return: 1|415|-296.60815|1575.80066|75.13008|135.73683|0|0|265 [17:20:11] >> mysql_retrieve_row( Connection handle: 1 ) [17:20:11] >> mysql_retrieve_row( Connection handle: 1 ) [17:20:11] >> mysql_free_result( Connection handle: 1 ) [17:20:11] CMySQLHandler::FreeResult() - Result was successfully free'd. [17:20:11] --------------------------- [17:20:11] MySQL Debugging de-activated [17:20:11] ---------------------------
Код:
stock LoadOvehs() { mysql_debug(1); new query[128]; format(query,128,"SELECT * FROM `orgvehs`"); mysql_query(query); mysql_store_result(); while(mysql_retrieve_row()) { new field[13][128],c1,c2; if(mysql_num_rows() == 0) continue; mysql_fetch_row_format(query, "|"); explode(query, field, "|"); new mdl,vidid,Float:x,Float:y,Float:z,Float:r; mdl=strval(field[1]); x=strval(field[2]); y=strval(field[3]); z=strval(field[4]); r=strval(field[5]); c1=strval(field[6]); c2=strval(field[7]); vidid=CreateVehicle(mdl,x,y,z+0.2,r,c1,c2,-1); vorg[vidid]=strval(field[0]); mysql_retrieve_row(1); } mysql_free_result(); mysql_debug(0); return 1; }