Closed ovo2 closed 9 years ago
The hasNext
function should be used like this:
while ($sql->hasNext()) {
// ...
$sql->next();
}
The name is maybe misleading, a better name would be valid()
.
But the current return value is correct. Otherwise the last row would be skipped.
$sql->hasNext() returns true even if the counter just points to the last row.