MySQL.
#1

pawn Код:
new
    Query[ 56 ]
;

format            ( Query, 51, "SELECT * FROM `playersdb` ORDER BY `Job` = '%d'", pData[ playerid ][ pJob ] );
mysql_query       ( Query );
mysql_store_result(       );
SendClientMessage ( playerid, -1, mysql_num_rows( ) );
mysql_free_result (       );

format            ( Query, 56, "SELECT `Name` FROM `playersdb` ORDER BY `Job` = '%d'", pData[ playerid ][ pJob ] );
mysql_query       ( Query );
mysql_store_result(       );
SendClientMessage ( playerid, Query );
mysql_free_result (       );
Is this will work? From first query I want to know how much more people there are in that job, and from second query I want to their names. Sorry for bad indentation, forum fucked it up.
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)