Hydrahon icon indicating copy to clipboard operation
Hydrahon copied to clipboard

PDO Fetch type must be FETCH_ASSOC for ->count() Method to Work

Open danFWD opened this issue 1 year ago • 0 comments

Just wanted to leave a note so you might either update your documentation or the method itself. When trying to return a count, if your $statement->fetchAll uses PDO::FETCH_OBJ instead of PDO::FETCH_ASSOC, the count method will always return 0.

Thanks

danFWD avatar May 04 '23 19:05 danFWD