forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: essaytee on January 14, 2011, 06:13:17 am

Title: Searching problem - characters being returned.
Post by: essaytee on January 14, 2011, 06:13:17 am
I've installed Coppermine 1.5.   Testing the search feature, I enter a single character, "1", searching against the default set (title, keywords etc.).   The problem is that where "1" is in the keyword ie "2010" it's being returned as a result, which shouldn't be the case.

I tag many photos with the bib number of runners & cyclists.   Sometimes bib numbers are single digits as opposed to three or more digits.

Any clues or suggestions please.

Title: Re: Searching problem - characters being returned.
Post by: Αndré on January 18, 2011, 02:30:48 pm
Untested: open include/search.inc.php, find
Code: [Select]
if (in_array($param, $allowed)) $fields[] = "$param LIKE '%$word%'";and replace with
Code: [Select]
if (in_array($param, $allowed)) $fields[] = "$param = '$word'";
Maybe you have to replace
Code: [Select]
if (in_array($param, $allowed)) $fields[] = "$param LIKE '%$string%'";with
Code: [Select]
if (in_array($param, $allowed)) $fields[] = "$param = '$string'";additionally.
Title: Re: Searching problem - characters being returned.
Post by: essaytee on January 23, 2011, 12:51:53 pm
Thanks, I'll give that a try.