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.5k Golang : Handling Yes No Quit query input
+21.3k Golang : Convert Unix timestamp to UTC timestamp
+5.1k Golang : Missing Subversion command
+11.2k Golang : Forwarding a local port to a remote server example
+38.3k Golang : UDP client server read write example
+5.7k Golang : How to setup a disk space used monitoring service with Telegram bot
+5k Golang : Function as an argument type example
+12.9k Golang: Pad right or print ending(suffix) zero or spaces in fmt.Printf example
+11.7k Golang : Drop cookie to visitor's browser and http.SetCookie() example
+18.3k Golang : Example for DSA(Digital Signature Algorithm) package functions
+5.7k Golang : When to use make or new?