Hi drawmack,
really appricate the help I got my loop working
$statement = "SELECT a FROM b WHERE ";
$keyword = "epiphone explorer";
$k = explode(" ",$keyword);
$k2 = count($k);
$colum = "product_code product_design product price ip";
$c = explode(" ",$colum);
while (list(,$ca) = each($c))
{
$i++;
for ($x=1; $x<=count($k); $x++)
{
$x = $x - 1;
$statement .= "$ca LIKE $k[$x] ";
$x = $x +1;
if ($i < count($c))
$statement .= " OR ";
}
}
However as you point out this is inefficient...
The problem lies in this search searches several tables where the values are constantly changing - so putting all the values into one column of one table is near impossible.
Can you think of any alternative way to efficiently searching through these tables - baring in mind the data I'm searching is constantly changing?
Any help would be greatly appriciated.
cheers