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
+6.2k Golang : Levenshtein distance example
+29.9k error: trying to remove "yum", which is protected
+8.4k Golang : How to control fmt or log print format?
+5.9k Unix/Linux : How to fix CentOS yum duplicate glibc or device-mapper-libs dependency error?
+14.4k Golang : Force download file example
+5.6k Golang : Handling image beyond OpenCV video capture boundary
+9.3k Golang : Text file editor (accept input from screen and save to file)
+16.3k Golang : Get future or past hours, minutes or seconds
+12.7k Golang : How to get year, month and day?
+18.2k Golang : Get RGBA values of each image pixel
+6.7k Golang : Handling Yes No Quit query input
+5k PHP : Get client IP address