Hi guys I need to search for a data in the database like 123.456.789 how can I search it even if I only entered 123456789 ? I need to escape the special characters from the database so that even if i search for 123456789 it can also display values like 123.456.789.
Here is my query:
SELECT *
FROM clients
WHERE REPLACE(phone, '.', '') LIKE ".$searchtext."
... where searchtext
is the number im looking for. It should return all values that match regardless of whatever special characters are present.