I have a table name "BusinessName" which has the usual business attributes. Anyways, I have this search engine that needs to have the business name fully type for it to search. For example, I have a business name of "Target", I have to type Target or else it wouldn't find it. Meaning, Tar will not find it or any other combinations besides Target.
My code:
$query = 'SELECT client_id,business_type_id,business_name,bu
siness_address,city,state_country,zip,busi
ness_phone,business_fax,webpagelink FROM BusinessName WHERE business_name LIKE \''.$searchterm.'\' LIMIT 0, 30';
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo "<p>Number of records found: ".$num_results."</p>";
for ($i=0; $i <$num_results; $i++)
Please help. I don't want to just look for Target. I want to be able to search anything related to whatever the term is being searched for. Meaning, it doesn't need to be "Target". It could be "Walmart", "Nike", "phpbuilder", "Chocolate" etc.
Another thing is that it duplicates record...I insert in an identical record and when search, I get two results...