Posts: 2,536
Location: Western Maryland
|
Yes, the LIKE does look for a comparable string. By using %% on either side of the user input, you are telling the database to look anywhere inside the value for that string. So if the user input 'vill', it would return Greenville or Village.
Now, let me clarify. A user may input one or more values into any of these variables, right? And if a user has something in $property_area, then you want to check the column area for matching properties. My question would be this: If a user put in an area and 'sleeps', do you want the results to be a set only of homes meeting BOTH criteria or EITHER criteria. It matters when writing the routine. Let me know and I'll show you how to solve it.
__________________
—Kyrnt
|