Cпасибо, но они не сплюсовываются Вот код: PHP: <? mysql_connect($db_host, $db_user, $db_pass); mysql_select_db($db_name); $query = "SELECT *, SUM(number) FROM table where(date='$date' and number!='') group by number"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['SUM(number)']; echo "<br />"; } ?> Помогите пожалуйста. Спасибо.
Без group by выдает ошибку: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
мда... мрак... делай два запроса: SELECT SUM(number) FROM table where(date='$date' and number!='') и SELECT * FROM table where(date='$date' and number!='')