dg / dibi

Dibi - smart database abstraction layer

Home Page:https://dibiphp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dibi can't count?

aolko opened this issue · comments

commented
Fatal error: Uncaught Dibi\NotSupportedException: Row count is not available for unbuffered queries.

Snippet:

$getAccount = $database->query('SELECT * FROM Accounts WHERE id = ?', $_GET['acc']);
if ($getAccount->getRowCount() >= 1){
    echo "found";
} else {
    echo "not found";
}

Fetch all rows using fetchAll() and count them.