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
+18.4k Golang : Write file with io.WriteString
+5.6k Swift : Get substring with rangeOfString() function example
+25.6k Golang : missing Mercurial command
+5.5k Golang : Configure crontab to poll every two minutes 8am to 6pm Monday to Friday
+7.7k Golang : How to execute code at certain day, hour and minute?
+11.4k Golang : Format numbers to nearest thousands such as kilos millions billions and trillions
+9.2k Golang : Generate random Chinese, Japanese, Korean and other runes
+29.3k Golang : Save map/struct to JSON or XML file
+4.9k Golang : micron to centimeter example
+8.2k Swift : Convert (cast) Character to Integer?
+10k Golang : Setting variable value with ldflags
+8.8k Android Studio : Image button and button example