Skip to content
This repository was archived by the owner on May 16, 2018. It is now read-only.
This repository was archived by the owner on May 16, 2018. It is now read-only.

Escaping DATE_FORMAT in "order" section of query REGRESSION #424

@druidvav

Description

@druidvav

After merging #418 we started reciving errors like that:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'DATE_FORMAT( FROM_UNIXTIME( t.last_update ) , '%Y-%m-%d' )' in 'order clause', query was: SELECT `t`.*, `g`.`name` AS `group_name`, `g`.`located_in` AS `group_located` FROM `user_questions_tickets` AS `t`
 LEFT JOIN `user_questions_tickets_group` AS `g` ON t.ticket_group = g.id WHERE (t.status = "opened") AND (t.is_system = 'n') AND (t.oversized = 1) ORDER BY `DATE_FORMAT( FROM_UNIXTIME( t`.`last_update ) , '%Y-%m-%d' )` DESC, `t`.`last_update` DESC LIMIT 20

In previous versions DATE_FORMAT in order section worked properly, and now it is broken. I believe this is important regression and should be fixed ASAP.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions