MySQL.
#4

Quote:
Originally Posted by Donya
Посмотреть сообщение
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 (       );
This is correct, I didn't really read what he was trying to do.
Reply


Messages In This Thread
MySQL. - by BaubaS - 26.06.2011, 19:04
Re: MySQL. - by [HiC]TheKiller - 26.06.2011, 20:05
Re: MySQL. - by Donya - 26.06.2011, 21:14
Re: MySQL. - by [HiC]TheKiller - 27.06.2011, 05:42
Re: MySQL. - by BaubaS - 27.06.2011, 10:55
Re: MySQL. - by Raimis_R - 27.06.2011, 11:00
Re: MySQL. - by BaubaS - 27.06.2011, 11:01
Re: MySQL. - by Raimis_R - 27.06.2011, 11:02
Re: MySQL. - by WooTFTW - 27.06.2011, 12:02
Re: MySQL. - by BaubaS - 27.06.2011, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)