I am using the following code that someone generously helped me out with:
db_connect();
$expo=preg_replace('/\s+/',' ',$query);
$query_array=explode(' ', $expo);
$query_array = array_unique($query_array);
foreach($query_array as $entry=>$word) {
$query_array[$entry] = "comp_info LIKE '%$word%'";
}
$search_query = join(' OR ',$query_array);
$result = mysql_query("SELECT * from company_data WHERE $search_query");
Right now it is only searching tabe comp_info. Can anyone show me how to make the above code search through multiple feilds?
Thanks in advance.