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.3k Golang : Archive directory with tar and gzip
+10.6k Golang : Handle API query by curl with Gorilla Queries example
+12.6k Golang : Tutorial on loading GOB and PEM files
+4.3k Golang : The Tao of importing package
+7.2k Golang : HTTP Server Example
+4.6k Unix/Linux/MacOSx : Get local IP address
+9.8k Golang : Removes punctuation or defined delimiter from the user's input
+7.8k Golang : Capture text return from exec function example
+4.5k Javascript : Shuffle or randomize array example
+24.6k Mac/Linux and Golang : Fix bind: address already in use error
+11.4k Golang : "https://" not allowed in import path
+7.3k Golang : How to check variable or object type during runtime?