Hello,

My below query does not product any result. i just want to know wether the comparison i am doing is correct.

table : sms_logs

to|date
------------------------------------
05244546 | 2013/04/30 08:46:42 AM
05244536 | 2013/02/10 08:46:42 AM
05244536 | 2013/02/10 08:46:42 AM
-----------------------------------

PHP Code:
Date1 '2013-04-01'
Now i want to pull all the sms sent for the past 4 months from the Date1.

PHP Code:
           $query1="SELECT * FROM sms_logs 
                    WHERE STR_TO_DATE(LEFT(date,10),'%Y/%m/%d') > DATE_SUB(
$date1,INTERVAL 180 DAY)"