SA-MP Forums Archive
MySQL Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Help (/showthread.php?tid=590649)



MySQL Help - Slawiii - 02.10.2015

Anyone can counvert this to MySQL R6 or R5

Код:
         new total = 0;
         total = (cache_num_rows() > 0) ? cache_get_field_content_int(0, "total") : 0;
         return (total >= MAX_GANG_MEMBER) ? false : true;  (MySQL R7 )
full Code:
PHP код:
stock bool:CheckGang(gangid)
{
    new 
total 0query[128];
    
format(querysizeof(query), "SELECT count(*) AS `total` FROM `member` WHERE `gang` = %d"Gang[gangid][GangID]);
    
mysql_query(query);
    
total = (cache_num_rows() > 0) ? cache_get_field_content_int(0"total") : 0;
    return (
total >= MAX_GANG_MEMBER) ? false true;




Re: MySQL Help - Slawiii - 02.10.2015

Bump