using case insensitive lookups that don't depend on sql server string comparison...
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 18 May 2004 13:07:49 +0000 (13:07 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 18 May 2004 13:07:49 +0000 (13:07 +0000)
mysql tested by me, postgresql tested by Patrick Welche <prlw1 at newn.cam.ac.uk>

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7484 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/abook_database.php

index 5fdd0d60ffe8bc649fe55f37f8c7c36a12f8edb8..94a9180e7dcffe25d4f05e2624b93317c0981a00 100644 (file)
@@ -173,7 +173,7 @@ class abook_database extends addressbook_backend {
             return false;
         }
          
-        $query = sprintf("SELECT * FROM %s WHERE owner='%s' AND nickname='%s'",
+        $query = sprintf("SELECT * FROM %s WHERE owner='%s' AND LOWER(nickname)='%s'",
                          $this->table, $this->owner, $this->dbh->quoteString($alias));
 
         $res = $this->dbh->query($query);