alecpl
2010-01-26 2273d4117fd50ee44dcdaa28fd6444383dc403a0
program/lib/MDB2/Driver/Datatype/mysql.php
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org>                           |
// +----------------------------------------------------------------------+
//
// $Id: mysql.php,v 1.65 2008/02/22 19:23:49 quipo Exp $
// $Id: mysql.php 292715 2009-12-28 14:06:34Z quipo $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -352,18 +352,24 @@
        }
        $match = '';
        if (!is_null($operator)) {
            $field = is_null($field) ? '' : $field.' ';
        if (null !== $operator) {
            $field = (null === $field) ? '' : $field.' ';
            $operator = strtoupper($operator);
            switch ($operator) {
            // case insensitive
            case 'ILIKE':
                $match = $field.'LIKE ';
                break;
            case 'NOT ILIKE':
                $match = $field.'NOT LIKE ';
                break;
            // case sensitive
            case 'LIKE':
                $match = $field.'LIKE BINARY ';
                break;
            case 'NOT LIKE':
                $match = $field.'NOT LIKE BINARY ';
                break;
            default:
                return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
                    'not a supported operator type:'. $operator, __FUNCTION__);