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
+8.4k Golang : Set or add headers for many or different handlers
+21k Curl usage examples with Golang
+12.8k Golang : Calculate elapsed years or months since a date
+23.7k Golang : Call function from another package
+16.2k Golang : How to implement two-factor authentication?
+10.9k Golang : Intercept and process UNIX signals example
+5.9k Golang : Scan forex opportunities by Bollinger bands
+34.1k Golang : How to stream file to client(browser) or write to http.ResponseWriter?
+15.6k Golang : Update database with GORM example
+14.1k Golang : How to determine if user agent is a mobile device example
+8.9k Android Studio : Indicate progression with ProgressBar example
+21k Golang : How to read float value from standard input ?