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
+13.1k Golang : Image to ASCII art example
+13.6k Golang: Pad right or print ending(suffix) zero or spaces in fmt.Printf example
+21k Golang : Convert string slice to struct and access with reflect example
+6.8k Golang : Transform lisp or spinal case to Pascal case example
+2.9k Golang : Fix go-cron set time not working issue
+14k Golang : How to filter a map's elements for faster lookup
+6.3k Golang : Find the longest line of text example
+18.3k Golang : convert int to string
+6.6k Golang : Fibonacci number generator examples
+15.1k Chrome : ERR_INSECURE_RESPONSE and allow Chrome browser to load insecure content
+8.4k Golang : Gorilla web tool kit schema example
+13.5k Golang : convert(cast) string to float value