愚者樹屋

|
Home About Contact
|

series

3d軟體 (1) apache (1) css (4) godot (8) google-api (1) google翻譯 (1) html (6) hugo安裝 (7) javasciprt (1) javascript (14) jquery (3) mysql (9) notepad++ (1) php (33) python (1) unity (1) yt-dlp (1) 像素畫 (1) 免費軟體 (8) 壓力測試 (2) 弱點掃描修補 (1) 無障礙網站 (1) 社群網站 (1) 遊戲推薦 (4) 雜記 (1)

Tags

2d軟體 3d軟體 ai apache css godot google-api google翻譯 html hugo javasciprt javascript jquery mysql notepad++ php python tcpdf unity vroid

mysql指定排序

post date - 2024/01/06
last update - 2024/01/06

在首頁顯示東西時意外用到這個東西,可以照指定的值來進行排序的方法,單純做個紀錄。

方法

mysql可以使用使用FIELD來指定順序,欄位名稱後面用,指定值得順序就好,只要有相同的值就會照這個順序排下來

ORDER BY FIELD (欄位名稱, 4, 5, 6, 1, 2, 3, 10, -4, 13, 11, 7, 12)

參考資料

https://stackoverflow.com/questions/7802944/explicitly-specify-sort-order-for-mysql-query

Tags : mysql

series

3d軟體 (1) apache (1) css (4) godot (8) google-api (1) google翻譯 (1) html (6) hugo安裝 (7) javasciprt (1) javascript (14) jquery (3) mysql (9) notepad++ (1) php (33) python (1) unity (1) yt-dlp (1) 像素畫 (1) 免費軟體 (8) 壓力測試 (2) 弱點掃描修補 (1) 無障礙網站 (1) 社群網站 (1) 遊戲推薦 (4) 雜記 (1)

Tags

2d軟體 3d軟體 ai apache css godot google-api google翻譯 html hugo javasciprt javascript jquery mysql notepad++ php python tcpdf unity vroid

Recent Posts

php 強型態

2023/07/22

使用yt-dlp下載需登入的嵌入式vimeo影片

2024/06/22

備份軟體freefilesync

2023/09/23

網站嵌入google翻譯(舊版本)

2023/11/25

obsidian檔案復原

2023/02/19

mastodon misskey pixiv plurk twitter 巴哈姆特

© 2022-2025 愚者樹屋