02.10.2015, 08:37
Anyone can counvert this to MySQL R6 or R5
full Code:
Код:
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 )
PHP код:
stock bool:CheckGang(gangid)
{
new total = 0, query[128];
format(query, sizeof(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;
}