core/MY_Model.php
public function update_by()
    {
        $args = func_get_args();
        $data = array_pop($args);

        $data = $this->trigger('before_update', $data);

        if ($this->validate($data) !== FALSE)
        {
            $this->_set_where($args);
            $result = $this->_database->set($data)
                               ->update($this->_table);
            $this->trigger('after_update', array($data, $result));

            return $result;
        }
        else
        {
            return FALSE;
        }
    }
public function update_by()
    {
        $args = func_get_args();
        $data = array_pop($args);

        $data = $this->trigger('before_update', $data);

        if ($this->validate($data) !== FALSE)
        {
            $this->_set_where($args);
            $result = $this->_database->set($data)
                               ->update($this->_table);
            $this->trigger('after_update', array($data, $result));

            return $result;
        }
        else
        {
            return FALSE;
        }
    }
public function update_by ( ) { $ args = func_get_args ( ) ; $ data = array_pop ( $ args ) ; $ data = $ this -> trigger ( 'before_update' , $ data ) ; if ( $ this -> validate ( $ data ) !== FALSE ) { $ this -> _set_where ( $ args ) ; $ result = $ this -> _database -> set ( $ data ) -> update ( $ this -> _table ) ; $ this -> trigger ( 'after_update' , array ( $ data , $ result ) ) ; return $ result ; } else { return FALSE ; } }
Updated a record based on an arbitrary WHERE clause.
Updated a record based on an arbitrary WHERE clause .