Skip to content

2.0.0 Beta 3

Pre-release
Pre-release
Compare
Choose a tag to compare
@trowski trowski released this 18 Dec 23:08
v2.0.0-beta.3
1f93ed0
  • Added Result::fetchRow(), which will return a single row (associative array) from the result set on each call until no further rows remain in the result.
// Iterate over result rows with a simple while loop
while ($row = $result->fetchRow()) {
    // ...
}

// Also useful if you know your result will contain only a single row
$id = $result->fetchRow()['id'] ?? throw new Exception('Item not found');