Hai folks,

i have records of transactions in a table.
the date of transactions have the below format

field name : dt
data type : varchar 255
ex: 2012-11-13

now i need to get all the transactions belongs to the previous months :

i had the following and was working only until December 31st

Code:
$m=date('m');
$query="SELECT COUNT(tid) as tot
        FROM transactions
		WHERE MONTH(dt) < $m";
pls help me . urgent!