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
+9.3k Golang : Get all countries currencies code in JSON format
+7k Golang : Transform lisp or spinal case to Pascal case example
+33.5k Golang : How to check if slice or array is empty?
+5.6k Golang : ROT32768 (rotate by 0x80) UTF-8 strings example
+35.1k Golang : Strip slashes from string example
+10.4k Golang : Select region of interest with mouse click and crop from image
+7.7k Golang : Scan files for certain pattern and rename part of the files
+6.4k Golang : Map within a map example
+10k Golang : Bcrypting password
+5.2k JavaScript/JQuery : Redirect page examples
+29.8k Golang : How to declare kilobyte, megabyte, gigabyte, terabyte and so on?
+3.3k Golang : Fix go-cron set time not working issue