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
+23.2k Golang : How to write CSV data to file
+6.5k Golang : Get curl -I or head data from URL example
+11.3k Golang : Get all local users and print out their home directory, description and group id
+3.5k Responsive Google Adsense
+17.1k Golang : Generate MD5 checksum of a file
+7k Yum Error: no such table: packages
+9.5k Android Studio : Password input and reveal password example
+3.3k Google : Block or disable caching of your website content
+13k Golang : How do I get the local IP (non-loopback) address ?
+3.7k Golang : The Tao of importing package
+12.7k Golang : Read large file with bufio.Scanner cause token too long error
+38.8k Golang : How to check if a string contains another sub-string?