Ini membutuhkan fungsi agregat. Gunakan SUM()
dan GROUP BY
dalam kueri Anda:
$newDate = "SELECT date_added,
SUM(menu_price )
FROM main
GROUP BY date_added
ORDER BY date_added DESC";
Ini membutuhkan fungsi agregat. Gunakan SUM()
dan GROUP BY
dalam kueri Anda:
$newDate = "SELECT date_added,
SUM(menu_price )
FROM main
GROUP BY date_added
ORDER BY date_added DESC";