Skip to content

Checking if db operation is successful #60

@alexweissman

Description

@alexweissman

A lot of the time, we're checking if UPDATE is successful by doing if ($stmt->rowCount() > 0). However, if you update a row with an identical value, this returns 0. This is fine for the most part, but in a few cases (like on user registration, when we set a user's primary group to its current value) we get an error when we shouldn't.
So, we need a better way to determine if these operations are 'successful' (and also try to decide what success actually means for these operations).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions