alecpl
2008-08-20 6f488bb55f08d64bbdd5255079a24501e55e6851
program/include/rcube_mdb2.php
@@ -509,6 +509,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