Pārlūkot izejas kodu

using case insensitive lookups that don't depend on sql server string comparison options.
mysql tested by me, postgresql tested by Patrick Welche <prlw1 at newn.cam.ac.uk>

tokul 21 gadi atpakaļ
vecāks
revīzija
044e1c12c8
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      functions/abook_database.php

+ 1 - 1
functions/abook_database.php

@@ -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);