php - Best way to save orders in array by date -
my database is: table: orders, columns: id (int), order_status(varchar), time (timestamp), price (decimal);
i want receive sum of orders prices each day in 1 array. best way that?
i've used this, lasts 24h, 48h, 72h... orders , not each day (from 00:00 until 23:59).
$timeback = time() - 86400; $time = time(); $month = array(); for($i = 0; $i < 30; $i++){ //query example $month[$i] = select orders `order_status` = 'completed' , `time` between {$timeback} , {$time} order `id` asc"); $timeback = $timeback - 86400; $time = $time - 86400; }
Moore and Mealy Machines
ReplyDeleteFinite Automata Regular Expression
Arden's Theorem
Automata Grammar
Unrestricted Grammar
Context Sensitive Grammar
Context Free Grammar
Regular Grammar