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.1k Golang : Find the shortest line of text example
+21k Golang : Convert PNG transparent background image to JPG or JPEG image
+8.7k Android Studio : Import third-party library or package into Gradle Scripts
+9.9k Golang : List available AWS regions
+16k Golang : How to login and logout with JWT example
+4.8k PHP : Extract part of a string starting from the middle
+14.9k Golang : Find commonalities in two slices or arrays example
+12.2k Golang : Pagination with go-paginator configuration example
+7.9k Golang : Lock executable to a specific machine with unique hash of the machine
+9.1k Golang : Inject/embed Javascript before sending out to browser example
+5.3k Golang : Print instead of building pyramids
+14.4k Golang : Get uploaded file name or access uploaded files