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
+9.1k Golang : Gaussian blur on image and camera video feed examples
+6.2k Fontello : How to load and use fonts?
+12.3k Golang : Sort and reverse sort a slice of runes
+16.3k Golang : How to check if input from os.Args is integer?
+16k Golang : Intercept Ctrl-C interrupt or kill signal and determine the signal type
+32k Golang : How to convert(cast) string to IP address?
+5.9k Linux : Disable and enable IPv4 forwarding
+9.5k Golang : Temperatures conversion example
+11.5k Golang : How to use if, eq and print properly in html template
+26.5k Golang : Calculate future date with time.Add() function
+30.1k Golang : Get and Set User-Agent examples
+21.3k Golang : For loop continue,break and range