MeekroDB v2.5
The main goal for this release is to resolve the problem discussed in #88, where the MySQL connection can time out if you have a long-running script that idles for long enough. MySQL's default wait_timeout is 8 hours, so I introduced a variable called $reconnect_after and set it to 4 hours by default. If at least that much time passes between your queries, the script will re-connect to the database before attempting the next query.
Major Changes:
- $reconnect_after -- If at least this many seconds have passed since the last query, re-connect before running the next query. (default: 4 hours)
All Changes:
- update() and delete() can optionally use a hash for the "where" part
- query() returns affected_rows count for non-select queries (it still returns false if the query failed and exception-throwing was disabled via a run_failed hook)
- insert(), insertIgnore(), insertUpdate(), update(), delete() also return affected_rows
- various bug fixes