5
Hey hsalazar
Thank you to point me that
However after the modifications sugested I still can?t obtain the results expected.
After looking the code I guess that a '%$queryarray[0]%' right after the OR ref LIKE was missing. And of course at the line 31, too.
So I did it and now we can search through XOOPS search function too
From line 22 to line 33 now we have:
// because count() returns 1 even if a supplied variable
// is not an array, we must check if $querryarray is really an array
$count = count( $queryarray );
if ( $count > 0 && is_array( $queryarray ) )
{
$sql .= "AND ((term LIKE '%$queryarray[0]%' OR definition LIKE '%$queryarray[0]%' OR ref LIKE '%$queryarray[0]%')";
for ( $i = 1; $i < $count; $i++ )
{
$sql .= " $andor ";
$sql .= "(term LIKE '%$queryarray[$i]%' OR definition LIKE '%$queryarray[$i]%' OR ref LIKE '%$queryarray[$i]%')";
}
$sql .= ") ";
BTW >As my avatar sugests I?m a curious monkey and not a coder so in order to get the results I did a look in other module that uses the same kind of function and used the same logic
Thanks a lot to point me that. Without your tip I guess I?ll search for a whole year
Now lets find the image and
tag troubles.
Saludos de Brasil