I am trying to have a search result for someones name exploded then the first name and last name each search against each field 'first' and 'last'.
But need to leave room what if someone search for first last midle name like = $who = James David Smith it will exploded it and search each of the names against the first column and the last column. Incase the user inputs the name lastname first or adds a middle name.
Here is what i have so far but im stuck. Help. Please.
<?
$search = explode(' ', $who);
$limit=verify($get['page'])?" limit ".($get['page']*10).",10":" limit 10";
$q="select * from users where (first IN('%$search[]%') or last IN('%$search[]%') or full_name LIKE '%".$get['who']."%') AND (city LIKE '%".$get['where']."%' or province LIKE '%".$get['where']."%') order by province";
$rows=get_recordset($q);
if(count($rows)){
foreach($rows as $row){
echo $q;
?>