DB row iterator

This commit is contained in:
2022-06-08 18:37:08 +02:00
parent 8b49b26f24
commit bce59c5f92
8 changed files with 189 additions and 43 deletions

View File

@@ -134,14 +134,14 @@ namespace Api\Settings {
->from("Settings")
->where(new CondBool("readonly"))
->where(new CondIn(new Column("name"), $keys))
->limit(1)
->first()
->execute();
$this->success = ($res !== FALSE);
$this->lastError = $sql->getLastError();
if ($this->success && !empty($res)) {
return $res[0]["name"];
if ($this->success && $res !== null) {
return $res["name"];
}
return null;