問題:
I looked around some and didn't find what I was after so here goes.我環顧四周,沒有找到我想要的東西,所以就這樣了。
SELECT * FROM trees WHERE trees.`title` LIKE '%elm%'
This works fine, but not if the tree is named Elm or ELM etc...這工作正常,但如果樹被命名爲 Elm 或 ELM 等,則不行...
How do I make SQL case insensitive for this wild-card search?如何使此通配符搜索的 SQL 不區分大小寫?
I'm using MySQL 5 and Apache.我正在使用 MySQL 5 和 Apache。
解決方案:
參考一: https://stackoom.com/question/C4Np參考二: How can I search (case-insensitive) in a column using LIKE wildcard?