19.06.2014, 22:17
Hey Guys and Girls,
I would like to convert a mysql code into sqlite code but I don't know how to achieve this with the following code
I know I can turn mysql_num_rows into db_num_rows
mysql_free_result into db_free_result
But I don't know how to handle the following codes:
and this one
Is there a way to do it?
Kind regards,
Mike
I would like to convert a mysql code into sqlite code but I don't know how to achieve this with the following code
Код:
loadGangZone( gzid ) { new query[256]; format(query, sizeof(query),"SELECT * FROM `gangzoneinfo` WHERE id=%d",gzid); db_query(GangZonesDB, query); // mysql_store_result(); if( mysql_num_rows() ) { if(mysql_fetch_row(query,"|")) { printf("[GangZone] A gz [id%d] estб sendo carregada..." , gzid ); new field[7][25]; explode(query, field, "|"); // mysql_free_result(); db_free_result(query); gangzoneInfo[gzid][gzId] = GangZoneCreate( floatstr(field[2]) , floatstr(field[3]) , floatstr(field[4]) , floatstr(field[5]) ); gangzoneInfo[gzid][gzName] = field[1]; gangzoneInfo[gzid][gzMinX] = floatstr( field[2] ); gangzoneInfo[gzid][gzMinY] = floatstr( field[3] ); gangzoneInfo[gzid][gzMaxX] = floatstr( field[4] ); gangzoneInfo[gzid][gzMaxY] = floatstr( field[5] ); gangzoneInfo[gzid][gzOwner] = strval( field[6] ); printf("[GangZone] A gz [id%d] foi carregada com os seguintes dados:" , gzid ); printf("[] ID: %d|Nome: %s|Owner: %d" , gangzoneInfo[gzid][gzId] , gangzoneInfo[gzid][gzName] , gangzoneInfo[gzid][gzOwner] ); printf("[] MinX: %f|MinY: %f|MaxX: %f|MaxY: %f|" , gangzoneInfo[gzid][gzMinX] , gangzoneInfo[gzid][gzMinY] , gangzoneInfo[gzid][gzMaxX] , gangzoneInfo[gzid][gzMaxY] ); printf("[GangZone] A gz [id%d] foi carregada por inteiro." , gzid ); } } }
mysql_free_result into db_free_result
But I don't know how to handle the following codes:
Код:
mysql_store_result
Код:
if(mysql_fetch_row(query,"|"))
Kind regards,
Mike