$sorgu = mysql_query("SELECT sum(fiyat*adet) as toplam FROM satilanlar"); $z= mysql_fetch_array($sorgu); $toplam =$z["toplam"];