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 )
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;
}