Issue
I have this code
$this->db->select("*")->from("events")->join("employees" , "events.event_manager_id = employees.employee_id")->where('events.status' , 1)->order_by(concat('events.event_start_date'.' '.'events.event_start_time','desc'));
event_start_date is in the format yyyy-mm-dd
and event_start_time is in hh:mm:ss
I want to sort the data based on concatenated event_start_date and event_start_time but this is giving me an error. Any ideas?
Solution
I've no idea why you want to use concat here. What about this ?
$this->db
->select("*")
->from("events")
->join("employees" , "events.event_manager_id = employees.employee_id")
->where('events.status' , 1)
->order_by("events.event_start_date",'desc');
->order_by("events.event_start_time",'desc');
Answered By - sintakonte
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.