$query = mysql_query("SELECT SUM(field) FROM table");