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
+21.1k Golang : Encrypt and decrypt data with TripleDES
+9.1k Golang : Web(Javascript) to server-side websocket example
+19.6k Golang : Determine if directory is empty with os.File.Readdir() function
+5k JavaScript/JQuery : Redirect page examples
+12.7k Swift : Convert (cast) Int to String ?
+13.5k Golang : Gin framework accept query string by post request example
+18.6k Golang : Read input from console line
+22.5k Golang : Calculate time different
+12.1k Elastic Search : Return all records (higher than default 10)
+9.8k Golang : Compare files modify date example
+9.2k Golang : Extract or copy items from map based on value