ClanCats / Hydrahon

🐉 Fast & standalone PHP MySQL Query Builder library.
https://clancats.io/hydrahon/master/
MIT License
278 stars 58 forks source link

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

Open danFWD opened 1 year ago

danFWD commented 1 year ago

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