From 253cc5890dec068d2ca3fb0ea2c36c1d945e8fa5 Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Fri, 03 Oct 2008 02:25:53 -0400
Subject: [PATCH] Fix typo.

---
 program/include/rcube_mdb2.php |   32 +++++++++++++++++++++-----------
 1 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index 9f2f30c..0588256 100644
--- a/program/include/rcube_mdb2.php
+++ b/program/include/rcube_mdb2.php
@@ -69,17 +69,6 @@
 
 
   /**
-   * PHP 4 object constructor
-   *
-   * @see  rcube_mdb2::__construct
-   */
-  function rcube_db($db_dsnw,$db_dsnr='')
-    {
-    $this->__construct($db_dsnw,$db_dsnr);
-    }
-
-
-  /**
    * Connect to specific database
    *
    * @param  string  DSN for DB connections
@@ -509,6 +498,27 @@
 
 
   /**
+   * Return SQL statement for case insensitive LIKE
+   *
+   * @param  string  Field name
+   * @param  string  Search value
+   * @return string  SQL statement to use in query
+   * @access public
+   */
+  function ilike($column, $value)
+    {
+    // TODO: use MDB2's matchPattern() function
+    switch($this->db_provider)
+      {
+      case 'pgsql':
+        return $this->quote_identifier($column).' ILIKE '.$this->quote($value);
+      default:
+        return $this->quote_identifier($column).' LIKE '.$this->quote($value);
+      }
+    }
+
+
+  /**
    * Adds a query result and returns a handle ID
    *
    * @param  object  Query handle

--
Gitblit v1.9.1