Skip to content

Command::update() - add ability to pass Query to UPDATE FROM #94

@exru

Description

@exru
$db = db()->createCommand("
    UPDATE     bet 
    SET        status = subquery.winr
    FROM       (:subquery) AS subquery 
    WHERE      bet.id = subquery.id
", ['subquery' => new Expression($this->leadersQuery()->select(['id', 'winr'])->createCommand()->rawSql)])->execute();

//->update(/*the truth is out there*/); needed

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions