SlightPHP\Db::update PHP Method

update() public method

update data
public update ( string | array | object $table, string | array | object $condition, string | array | object $item ) : integer | boolean
$table string | array | object
$condition string | array | object
$item string | array | object
return integer | boolean
    public function update($table, $condition, $item)
    {
        $table = $this->__array2string($table);
        $value = $this->__quote($item, ",");
        $condiStr = $this->__quote($condition, "AND");
        if ($condiStr != "") {
            $condiStr = " WHERE " . $condiStr;
        }
        $sql = "UPDATE {$table} SET {$value} {$condiStr}";
        return $this->__query($sql);
    }