Result¶
Every query executed will return Blrf\Dbal\Result
object.
<?php
class Result {
public readonly array $rows = [];
public readonly ?int $insertId = null;
public readonly int $affectedRows = 0;
public readonly int $warningCount = 0;
}
$rows¶
SELECT
queries will return result with $rows
array.
Iterator¶
Result implements Iterator so you can also use Result object as an array:
$insertId¶
INSERT
queries with sequence/autoincrement/... table keys will return last insert id.
$affectedRows¶
UPDATE
or DELETE
queries will report affected rows.