Pagekit\Database\Query\QueryBuilder::getSQLForUpdate PHP 메소드

getSQLForUpdate() 보호된 메소드

Creates the "update" SQL string from the query parts.
protected getSQLForUpdate ( ) : string
리턴 string
    protected function getSQLForUpdate()
    {
        extract($this->parts);
        $query = "UPDATE {$from}";
        foreach ($join as $j) {
            $query .= sprintf(' %s JOIN %s ON %s', strtoupper($j['type']), $j['table'], (string) $j['condition']);
        }
        $query .= " SET " . implode(', ', $set);
        if ($where) {
            $query .= ' WHERE ' . $where;
        }
        return $query;
    }