I have a mysql query which is used to search through business listings and turn up results, depending on the business name and state the user wants to search for. I have " where Bname like '%"&strBusiness&"%'" " in my query (its asp) to ensure that I get all business names similar to that entered by the person to show up.
Here are a couple of examples of what is happening:
If the person types Univer into the business name, among those that show up, Universal Paragon Corporation will too.
But, if the person types in Universal, the only 2 businesses that show up are ones called Universal. but Universal Paragon Corporation does not show up.
Now if I have the % on the beginning and at the end of my business string, shouldn't whatever was typed be matched up with any listing that has what was typed somewhere within it.
To make things even more weird, if you type in Universal%, Universal Paragon Corporation does in fact come up...now why should the person entering the business name have to manually add % at the end of the business name...it makes no sense.
Any and all help would be greatly appreciated.
Edited by Tirus, 28 September 2006 - 04:56 PM.
