Gdn_SQLDriver::put PHP Method

put() public method

Builds the update statement and runs the query, returning a result object.
public put ( string $Table = '', mixed $Set = null, string $Where = false, integer $Limit = false )
$Table string The table to which data should be updated.
$Set mixed An array of $FieldName => $Value pairs, or an object of $DataSet->Field properties containing one rowset.
$Where string Adds to the $this->_Wheres collection using $this->Where();
$Limit integer Adds a limit to the query.
    public function put($Table = '', $Set = null, $Where = false, $Limit = false)
    {
        $this->update($Table, $Set, $Where, $Limit);
        if (count($this->_Sets) == 0 || !isset($this->_Froms[0])) {
            $this->reset();
            return false;
        }
        $Sql = $this->getUpdate($this->_Froms, $this->_Sets, $this->_Wheres, $this->_OrderBys, $this->_Limit);
        $Result = $this->query($Sql, 'update');
        return $Result;
    }