Posted by newbie on 08/02/07 07:55
table 'order' looks like this:
------------------------------------------------------------
| order_id (int) | time_placed(datetime) |
------------------------------------------------------------
| 014 | 2007-07-12 12:12:00 |
------------------------------------------------------------
I want to query all the orders that are placed on a particular
month( and different month has different ending date--28, 30, 31). I
want to have a sort of function with the following interface, is there
an existing mysql function does that?
Thanks.
function select_order_of_month($month) {
$sql_query = "SELECT COUNT(*) FROM `order` WHERE *I really want to
specify the interval for the whole month here*";
}
[Back to original message]
|