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
+4.7k Nginx and PageSpeed build from source CentOS example
+5.8k Golang : How to verify input is rune?
+19.2k Golang : Example for DSA(Digital Signature Algorithm) package functions
+30.9k Golang : bufio.NewReader.ReadLine to read file line by line
+25.5k Golang : How to read integer value from standard input ?
+26.5k Golang : Force your program to run with root permissions
+10.1k Fix ERROR 1045 (28000): Access denied for user 'root'@'ip-address' (using password: YES)
+5.9k Golang : Extract XML attribute data with attr field tag example
+7.1k Golang : Individual and total number of words counter example
+18.8k Golang : Clearing slice
+33.7k Golang : Proper way to set function argument default value