Hi there!
I've built a search that works but relies on the users to input their request very accurately.
The data they're searching on are phone numbers which come from a MySQL DB.
In the DB, phone numbers (from all over the world) are stored WITH spaces, like for example: 123 456 7890
What happens is people are typing in "1234567890" and this is coming up with no result.
This also occurs if users type in: "123 4567890"...
May be it would be also necessary to eliminate all spaces in the user's request prior to execute the query...
How should I write my queries to make them work?
Due to the infinite power of PHP, I'm quite sure a simple solution exists.
The script could first transform the user's string in a string with no spaces then compares this new string against those contained in the DB ignoring while reading the existing spaces...
This method avoid modification of the DB...
Any help would be most appreciated and I thank you in advance for it.