Changeset 46

Show
Ignore:
Timestamp:
05/15/2007 02:59:37 PM (19 months ago)
Author:
zombor
Message:

fixed ticket #26, add ability to have null values in where clause, and escape key values

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/system/database/DB_active_rec.php

    r44 r46  
    218218                                if ( ! $this->_has_operator($k)) 
    219219                                { 
    220                                         $k .= ' ='; 
     220                                        $k = '`' . $k . '` ='; 
    221221                                } 
    222222                         
    223223                                $v = ' '.$this->escape($v); 
    224224                        } 
    225                                                  
     225                        else 
     226                        { 
     227                                $k = '`' . $k . '` IS NULL'; 
     228                        } 
     229                                         
    226230                        $this->ar_where[] = $prefix.$k.$v; 
    227231                }