regex - MySQL query to handle encoded characters using Regular Expressions -
The initial search string for the purpose of handling a particular keyword in my problem is a list of a MySQL table for the list of matching names Searching involves such & ouml ;, which are encoded with an html unit (& ouml;).
Example:
There is a table called 'Table', for the name of the city, the column is called 'Naam', two cities Hamburg (ID1) and H & Oll; Mellinina (ID2) H & Oul; Are stored as meninae.
Someone searches for a standard "ham" string using a standard question like
SELECT id, the name of the name with the name '% ham' will only return only.
I have a regex that parses the character from the unit, but it is implemented in PHP and given below for completion.
preg_replace ("/ and (.). *;", '$ 1', $ city_name); Have a query to include the majority of single characters with entities?
You should not use HTML character references in the database. Instead you should choose the right and store the data in plain text.
Comments
Post a Comment