Database error: Invalid SQL: select *, date_format(cdate,'%d') as date_d, date_format(cdate,'%b') as date_m from columns where columnists_id= AND (DATE_FORMAT(cdate,'%Y-%m-%d') >=DATE_FORMAT('2012-10-01','%Y-%m-%d') AND DATE_FORMAT(cdate,'%Y-%m-%d') <=DATE_FORMAT('2014-09-30','%Y-%m-%d')) order by cdate desc limit 1
MySQL Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (DATE_FORMAT(cdate,'%Y-%m-%d') >=DATE_FORMAT('2012-10-01','%Y-%m-%d') AND DA' at line 1)
Session halted.