Need help with search function, again.... Need help with search function, again....
 

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

Need help with search function, again....

Started by squid, April 12, 2006, 03:26:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

squid

Hey guys,

I am new to Coppermine, and so far I love it. I am into motorsports photography, and hope I can use the gallery as a selling feature on my website.

I have managed to get the search function to work, but with limitations. I have the images tagged by rider number, and if I do a search for lets say, 466, it works fine. If I do a search for 66, 466 comes up.

Is there any way to force the search to find only the exact search criteria entered?

Thanks on advance for all your help.

Emile Cooper.

Nibbler

Edit include/search.inc.php, find

if (in_array($param, $allowed))$fields[] = "$param LIKE '%$word%'";

change to

if (in_array($param, $allowed))$fields[] = "$param = '$word'";

squid

Thanks Nibbler

Worked perfectly.

Now for my next question.

Is there a way to set up the search feature so I can search for say, 466 and pick an event (album)?