Case Sensitive Searching on IIS hosted Coppermine Case Sensitive Searching on IIS hosted Coppermine
 

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

Case Sensitive Searching on IIS hosted Coppermine

Started by cnl24, March 05, 2007, 08:38:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cnl24

Hi,
We have a customer hosting on our Windows 2003 server and would like to know how to use case sensitive searching on their website? They are a professional photographer and have a huge library of photos that can be searched so this is an essential thing for them. I am no programmer, so if anyone has a solution then please can you give it to me in some kind of english  :)
Many thanks in advance,
CNL24

Nibbler

Best way is to use a case sensitive collation in the db. If you don't want to edit the db then you'd need to make a code change each time you update Coppermine.

include/search.inc.php

find

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

change to

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