Hi all, this is my first post here. i was wondering if you could help my site function better by removing "and", "or", from the search query.
Here's the code:
}
/* generate query syntax for searching in auction */
$search_words = explode (" ", $qquery);
/* query part 1 */
$qp1 = "";
$qp = "";
$qp1 .=
" (title LIKE '%".
addslashes($qquery).
"%') OR (description LIKE '%".
addslashes($qquery)."%') ";
$qp .= " (cat_name LIKE '%".addslashes($qquery)."%') ";
$addOR = true;
while ( list(,$val) = each($search_words) )
{
$val = ereg_replace("%","\\%",$val);
$val = ereg_replace("_","\\_",$val);
if ($addOR)
{
$qp1 .= " OR ";
$qp .= " OR ";
}
$addOR = true;
$qp1 .=
" (title LIKE '%".
addslashes($val).
"%') OR (description LIKE '%".
addslashes($val)."%') ";
$qp .= "(cat_name LIKE '%".addslashes($qquery)."%') ";
}
//it is possible i did not paste the correct part of the code, if so let me know.
-Dominic Son