30.05.2016, 14:36
PHP код:
mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `friends` WHERE `AddBy` = '%d'", PlayerInfo[playerid][pSQLID]);
results = mysql_query(SQL, gQuery);
for(new i, j = cache_get_row_count (); i != j; ++i)
{
cache_get_field_content(i, "friendName", gString);
new userID = GetPlayerID(gString);
if(userID != INVALID_PLAYER_ID) onf ++;
}
cache_delete(results);
PHP код:
mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `friends` WHERE `AddBy` = '%d' AND `friendID` = '%d'", PlayerInfo[i][pSQLID], PlayerInfo[playerid][pSQLID]);
results = mysql_query(SQL, gQuery);
cache_get_field_content(0, "AddBy", gString);