28.07.2012, 18:18
code
PRINTS
ADMIN:0
LANG:0
VIP:1
ACTUALLY THEY ARE ALL 1
DEBUG:
Код:
new Query[256],pName[MAX_PLAYER_NAME],Admin[1],Lang[1],VIP[1]; GetPlayerIp(playerid,IP[playerid],16); GetPlayerName(playerid,pName,24); format(Query,sizeof(Query),"SELECT * FROM `users_drift` WHERE username = '%s' LIMIT 1",PlayerName(playerid)); mysql_query(Query); mysql_store_result(); mysql_retrieve_row(); mysql_get_field("Admin",Admin); mysql_get_field("Lang",Lang); mysql_get_field("VIP",VIP); printf("Admin:%d",strval(Admin)); printf("Lang:%d",strval(Lang)); printf("VIP:%d",strval(VIP));
ADMIN:0
LANG:0
VIP:1
ACTUALLY THEY ARE ALL 1
DEBUG:
Код:
[21:24:43] >> mysql_query( Connection handle: 1 ) [21:24:43] CMySQLHandler::Query(SELECT * FROM `users_drift` WHERE username = '[DDT]Andrey' LIMIT 1) - Successfully executed. [21:24:43] >> mysql_store_result( Connection handle: 1 ) [21:24:43] CMySQLHandler::StoreResult() - Result was stored. [21:24:43] >> mysql_retrieve_row( Connection handle: 1 ) [21:24:43] >> mysql_fetch_field_row( Connection handle: 1 ) [21:24:43] CMySQLHandler::FetchField("Admin") - 1 [21:24:43] >> mysql_fetch_field_row( Connection handle: 1 ) [21:24:43] CMySQLHandler::FetchField("Lang") - 1 [21:24:43] >> mysql_fetch_field_row( Connection handle: 1 ) [21:24:43] CMySQLHandler::FetchField("VIP") - 1 [21:24:43] >> mysql_query( Connection handle: 1 ) [21:24:43] CMySQLHandler::Query(SELECT * FROM `users_drift` WHERE username = '[DDT]Andrey' LIMIT 1) - Successfully executed. [21:24:43] >> mysql_store_result( Connection handle: 1 ) [21:24:43] CMySQLHandler::StoreResult() - Result was stored. [21:24:43] >> mysql_num_rows( Connection handle: 1 ) [21:24:43] CMySQLHandler::NumRows() - Returned 1 row(s) [21:24:43] >> mysql_free_result( Connection handle: 1 ) [21:24:43] CMySQLHandler::FreeResult() - Result was successfully free'd. [21:24:46] >> mysql_query( Connection handle: 1 ) [21:24:46] CMySQLHandler::Query(SELECT * FROM `users_drift` WHERE username = '[DDT]Andrey' LIMIT 1) - Successfully executed. [21:24:46] >> mysql_store_result( Connection handle: 1 ) [21:24:46] CMySQLHandler::StoreResult() - Result was stored. [21:24:46] >> mysql_retrieve_row( Connection handle: 1 ) [21:24:46] >> mysql_fetch_field_row( Connection handle: 1 ) [21:24:46] CMySQLHandler::FetchField("IP") - 192.168.1.2 [21:24:46] >> mysql_num_rows( Connection handle: 1 ) [21:24:46] CMySQLHandler::NumRows() - Returned 1 row(s) [21:24:46] >> mysql_free_result( Connection handle: 1 ) [21:24:46] CMySQLHandler::FreeResult() - Result was successfully free'd.