in my table i have a column current_date the value is 2012-11-27.
heres my code
$query = QModel::query("SELECT * FROM transaction WHERE current_date='$order_date'");
The value of $order_date is year-month only “2012-10“, how can i split the current_date into year-month only “2012-10“…
should I use CHARINDEX to split the current_date??? how please…
thanks
well if you need to select all records within one month you can do follows:
I cannot advice to use
monthandyearfunctions because your indexes will not workupdate: AFAIK, in MySQL it will be