got some code running from ZF 2.0.3 to ZF 2.0.6, but after upgrade to 2.1.1 it stopped working, i have some SELECT queries with a DATE_FORMAT in the WHERE clause and its not working anymore in all queries that implement it ( i have it on 3 different queries and all 3 are doing the same).
- Code: Select all
$sql = $this->getSql();
$select = $this->buildDefaultSelect();
$select ->where("DATE_FORMAT(date, '%Y') = $year")
is building the following SQL query:
SELECT `blog_posts`.*, `users`.`name` AS `name`, `blog_categories`.`name` AS `cat_name`, `blog_categories`.`alias` AS `cat_alias`, `blog_categories`.`icon` AS `cat_image` FROM `blog_posts` INNER JOIN `users` ON `blog_posts`.`id_user` = `users`.`id` INNER JOIN `blog_categories` ON `blog_posts`.`id_category` = `blog_categories`.`id` WHERE ORDER BY `date` DESC, `date` DESC"
As you can see, the WHERE Clause is empty, it was working fine to 2.0.6. What has changed since then and how to solve it?