mysql fetch [rep+]
#1

NOW WHEN I GOT YOUR ATTENTION WITH REP+(i WILL DO IT IF YOU HELP ME AND IT WORK)
Код:
	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));
PRINTS
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.
Reply


Messages In This Thread
mysql fetch [rep+] - by TheDeath - 28.07.2012, 19:26

Forum Jump:


Users browsing this thread: 1 Guest(s)