Author Topic: Order Stats for Backery  (Read 2207 times)

Offline workflor

  • Posts: 3
Order Stats for Backery
« on: June 15, 2010, 10:07:31 AM »

i yust thought about a little problem. i need a small order stat, that means, i need a list of all products and the numbers of orders. i need a count for a year and for a month (i want so select). i think a simple PHP-Script for CODe-Page is a soulition.


Offline workflor

  • Posts: 3
Re: Order Stats for Backery
« Reply #1 on: June 15, 2010, 11:44:18 AM »
ok ... the statement for php

$sql = 'SELECT sku , SUM( quantity ) , order_date FROM wb_altadel_mod_bake ry_order WHERE EXTRACT( MONTH FROM order_date ) = $month AND EXTRACT( YEAR FROM order_date ) = $year GROUP BY sku LIMIT 0, 30 ; ';

it is the statement but i dont know the rest for an form ... can someone help?