Adsense
Popular Posts
- Code update from PHP 7.4 to PHP 8.1 - PhpSpreadsheet
- MySQL workbench -"Could not decrypt password cache"
- Code update from PHP 7.4 to PHP 8.1 - Worksheet/Iterator.php
- Rendering HTML tags inside textarea
- axios handle blob type data
- Unix Utils and wget in Windows
- increase mysql query speed
- Setup vi syntax for PHP
- Get WAMP running on EC2
- EXCEL return to the next line in the same cell
Wednesday, November 28, 2018
MySQL case when in order
Example of using CASE WHEN ... ELSE... END ) in ORDER BY in MySQL
ORDER BY
(CASE WHEN ranks.`EndDate` IS NULL OR ranks.`EndDate`='0000-00-00' OR TRIM(ranks.EndDate)='' THEN '9999-12-20'
ELSE
ranks.`EndDate` END) DESC,
Labels:
MySQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment