I am trying to build a search box which will search in 2 columns.
html
<div class="autocomplete-list1">
<input type="text" class="searchpropertyinputs areaname-list-completed" name="buildingorlocation" id="buildingorlocation" placeholder="Building or Location" onkeyup="autofillbuildingorlocation()" maxlength="50" />
<ul class="areaname-list searchpropertyinputs" id="property_buildingorlocation_list"></ul>
</div>
php
$property_buildingorlocation = ($_GET['buildingorlocation']);
$property_buildingorlocation = str_replace(',', ' ', $property_buildingorlocation);
$select = $con->prepare(
"SELECT
*
from
tbl_property
WHERE
property_buildingname LIKE '%$property_buildingorlocation%'
OR property_areaname LIKE '%$property_buildingorlocation%'");
$select->setFetchMode(PDO::FETCH_ASSOC);
$select->execute();
If i enter up to two key words like madison garden, then the result comes but if i put three like madison garden road then there is no result... can anyone enlighten me please..