Searching problem - characters being returned. Searching problem - characters being returned.
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Searching problem - characters being returned.

Started by essaytee, January 14, 2011, 06:13:17 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

essaytee

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.


ΑndrĂ©

Untested: open include/search.inc.php, find
if (in_array($param, $allowed)) $fields[] = "$param LIKE '%$word%'";
and replace with
if (in_array($param, $allowed)) $fields[] = "$param = '$word'";

Maybe you have to replace
if (in_array($param, $allowed)) $fields[] = "$param LIKE '%$string%'";
with
if (in_array($param, $allowed)) $fields[] = "$param = '$string'";
additionally.

essaytee