Hallo Leute,
was ist bitte an dieser Abfrage verkehrt.
Ich bekomme ne Fehlermeldung:
1140 - Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
SELECT o.date_purchased, sum(ot.value) as orders_count FROM orders_total ot, orders o where ot.class = 'ot_total' and date_purchased >= DATE_SUB(NOW(), INTERVAL 30 DAY)
[TEP STOP]
Ich kapiers nicht.
was ist bitte an dieser Abfrage verkehrt.
PHP:
// Umsatz GESAMT
$query_alle_pr = "SELECT o.date_purchased, sum(ot.value) as orders_count FROM " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS . " o where ot.class = 'ot_total' and date_purchased >= DATE_SUB(NOW(), INTERVAL 30 DAY)";
$result_alle_pr = tep_db_query($query_alle_pr);
$row_alle_pr = tep_db_fetch_array($result_alle_pr);
Ich bekomme ne Fehlermeldung:
1140 - Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
SELECT o.date_purchased, sum(ot.value) as orders_count FROM orders_total ot, orders o where ot.class = 'ot_total' and date_purchased >= DATE_SUB(NOW(), INTERVAL 30 DAY)
[TEP STOP]
Ich kapiers nicht.