mapguesser/database/migrations/data/20200614_1328_user_confirmation.php
Pőcze Bence be905abfd4
Some checks failed
mapguesser/pipeline/pr-develop There was a failure building this commit
MAPG-243 use soko-web framework
2023-04-07 20:22:53 +02:00

18 lines
446 B
PHP

<?php
use SokoWeb\Database\Query\Modify;
use SokoWeb\Database\Query\Select;
use SokoWeb\Interfaces\Database\IResultSet;
$select = new Select(\Container::$dbConnection, 'users');
$select->columns(['id']);
$result = $select->execute();
while ($map = $result->fetch(IResultSet::FETCH_ASSOC)) {
$modify = new Modify(\Container::$dbConnection, 'users');
$modify->setId($map['id']);
$modify->set('active', true);
$modify->save();
}