Skip to content

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

@danFWD

Description

@danFWD

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions