я написал запрос
$advert = mysql_query("SELECT SUM(income) FROM `advert` WHERE `club_id`='$club_id'");
$advertf = mysql_fetch_array($advert);
а теперь как вывести эту сумму???
$advert = mysql_query("SELECT SUM(`income`) AS `sum` FROM `advert` WHERE `club_id`='$club_id'");
$advertf = mysql_fetch_array($advert);
echo $advertf['sum'];
$advert = mysql_query("SELECT SUM(`income`) FROM `advert` WHERE `club_id`='$club_id'");
$advertf = mysql_fetch_array($advert);
echo $advertf['SUM(`income`)'];