Skip to content

Minor Release

Latest
Compare
Choose a tag to compare
@rotexdegba rotexdegba released this 07 Jun 23:50
· 1 commit to master since this release
  • Updated the logic for calculating number of deleted records in deleteMatchingDbTableRows(array $cols_n_vals): int in the Model class
    • Now using a select count(*) with the same where conditions as the delete statement to get the count of matching values before and after executing the delete statement and then returning the difference of these values
    • The old method relied on PDOStatement::rowCount() which seems to have different behaviors for Sqlite & PostgreSQL under certain conditions
      • see https://www.php.net/manual/en/pdostatement.rowcount.php
        • public PDOStatement::rowCount(): int
          • This method returns "0" (zero) with the SQLite driver at all times, and with the PostgreSQL driver only when setting the PDO::ATTR_CURSOR statement attribute to PDO::CURSOR_SCROLL.

Full Changelog: 4.1.0...4.1.1