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
+7.2k Golang : Rot13 and Rot5 algorithms example
+7.7k Golang : Check from web if Go application is running or not
+13.3k Generate salted password with OpenSSL example
+32.8k Delete a directory in Go
+8.5k Golang : Combine slices but preserve order example
+6.9k Golang : Get Alexa ranking data example
+11.7k Golang : Find and draw contours with OpenCV example
+16.5k Golang : read gzipped http response
+14.3k Golang : Overwrite previous output with count down timer
+44.4k Golang : Use wildcard patterns with filepath.Glob() example
+7.3k Golang : How to handle file size larger than available memory panic issue