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
+7.4k Golang : Metaprogramming example of wrapping a function
+4.7k Golang : Intercept, inject and replay HTTP traffics from web server
+12.2k Android Studio : Password input and reveal password example
+15k Golang : Read a file line by line
+5k Unix/Linux : How to test user agents blocked successfully ?
+8.2k Golang : Inject/embed Javascript before sending out to browser example
+11k Golang : Clean formatting/indenting or pretty print JSON result
+14.3k Golang : Get timezone offset from date or timestamp
+7.6k Golang : Convert word to its plural form example
+9.2k Golang : Find and replace data in all files recursively
+14.4k Golang : Get query string value on a POST request
+8k Golang : GMail API create and send draft with simple upload attachment example