Reputation: 114
SELECT *
FROM `user_job_application`
ORDER BY `user_job_application`.`user_id` DESC
It gives the table result like image preview.
but when user_id
is same then, I want to fetch result order by user_job_application_date desc
Upvotes: 2
Views: 1552
Reputation: 1
SELECT * FROM `user_job_application`
ORDER BY `user_job_application`.`user_id` DESC,
`user_job_application`.`user_job_application_date` DESC;
Just put a comma after your DESC and add the next ORDER BY item.
Upvotes: 0
Reputation: 6193
We can ORDER
results using multiple columns.
Try this:
SELECT *
FROM `user_job_application`
ORDER BY `user_job_application`.`user_id` DESC, user_job_application_date desc
Upvotes: 8