Answer the question
In order to leave comments, you need to log in
How to make correct sorting in CGridView?
Hello.
I have a table with columns due_date , status
`due_date` date DEFAULT NULL,
`status` enum('processing','new','progress','pending','completed','deleted') DEFAULT 'processing',
Answer the question
In order to leave comments, you need to log in
You most likely need multisorting.
SELECT * FROM yourtable
ORDER BY `DATE` DESC, `IMPORTANCE` DESC
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question