MariaDB/MySQL : Form select statement or search query with Chinese characters
Continue from the previous tutorial on how to handle non-ASCII characters in URL. Just a note on how to form select statement or search query with Chinese characters as search parameter. Putting this note down for future reference. Maybe useful to you as well.
SELECT * FROM table where title like '%白文春%'
or increase the search scope
SELECT * FROM table where title like '%白%春%'
For accuracy, just use equal sign.
SELECT * FROM table where title = '白文春'
Reference :
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+10.5k Golang : Generate random integer or float number
+18.7k Golang : Set, Get and List environment variables
+15.7k Golang : Convert date format and separator yyyy-mm-dd to dd-mm-yyyy
+5.3k Golang : The Tao of importing package
+34.2k Golang : Create x509 certificate, private and public keys
+7.6k Golang : Shuffle strings array
+5.9k Golang : ROT32768 (rotate by 0x80) UTF-8 strings example
+12.2k Golang : Sort and reverse sort a slice of runes
+9.9k Golang : Format strings to SEO friendly URL example
+3.8k Java : Random alphabets, alpha-numeric or numbers only string generator
+29.5k Golang : Save map/struct to JSON or XML file
+6.6k Golang : Spell checking with ispell example