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
+5.1k Python : Convert(cast) string to bytes example
+8.7k Golang : Sort lines of text example
+13.9k Golang : Fix image: unknown format error
+25.8k Mac/Linux and Golang : Fix bind: address already in use error
+20.2k Golang : Pipe output from one os.Exec(shell command) to another command
+19.3k Golang : How to Set or Add Header http.ResponseWriter?
+18.3k Golang : Iterating Elements Over A List
+8.8k Golang : Inject/embed Javascript before sending out to browser example
+12.2k Golang : "https://" not allowed in import path
+6.1k Unix/Linux : Use netstat to find out IP addresses served by your website server
+11.9k Golang : md5 hash of a string
+9.3k Golang : How to extract video or image files from html source code