Forum Moderators: coopster
One of the fields will be the complete property name.
I see 2 ways for the user find reviews on a property.
-an alphabetical list of properties, each of which is a link with query
-a search box that generates a query
I see all sorts of problems with a search box. Wrong spellings, caps, spaces, periods, etc. And the fact that many properties can have a partial match.
"Miami Beach Motel"
"Miami Beach Strand Motel"
"Beach Strand Motel"
etc
Can someone suggest an approach that will work well for the user as well as being accurate?
I will be hiring someone to have a look at the database structure I come up with and to write a sample PHP query
$search = $_GET['search'];
$sql = mysql_query("SELECT * FROM table_hotels WHERE hotel_name LIKE %$search%");
So if someone searches "motel" it'll return all results with that word in it. If someone searches "miami motel" all results with that string will be returned, like "cheap miami motel" and "miami motel and restaurant"
Of course you'll want to clean it up to avoid sql injection.. lol