26.06.2011, 21:14
i think that might not work either. if it doesn't try this
pawn Код:
new
Query[ 56 ]
;
format ( Query, 51, "SELECT * FROM `playersdb` WHERE `Job` = %d", pData[ playerid ][ pJob ] );
mysql_query ( Query );
mysql_store_result( );
SendClientMessage ( playerid, -1, mysql_num_rows( ) );
mysql_free_result ( );
new Name[MAX_PLAYER_NAME], Escape[24];
GetPlayerName(playerid, Name, 24);
mysql_real_escape_string(Name, Escape);
format ( Query, 56, "SELECT `Job` FROM `playersdb` WHERE `Name` = '%s' LIMIT 1", Escape );
mysql_query ( Query );
mysql_store_result( );
new str[50];
format(str, sizeof(str), "Your job is ID %d", mysql_fetch_int());
SendClientMessage ( playerid, str);
mysql_free_result ( );