SlightPHP\Db::update PHP 메소드

update() 공개 메소드

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
리턴 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);
    }