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
+13k Golang : How to convert(cast) IP address to string?
+4.9k Golang : Embedded or data bundling example
+14.8k Golang : How to run your code only once with sync.Once object
+7.7k Golang : Terminate-stay-resident or daemonize your program?
+4k Golang : If else example and common mistake
+21k Golang : minus time with Time.Add() or Time.AddDate() functions to calculate past date
+9.6k Golang : How to calculate the distance between two coordinates using Haversine formula
+5k Golang : Check if password length meet the requirement
+6.6k Swift : Convert (cast) Character to Integer?
+7.4k Golang : Go as a script or running go with shebang/hashbang style
+13k Golang : Get checkbox or extract multipart form data value example
+15.4k Golang : Get all upper case or lower case characters from string example