Skip to content

Releases: dcblogdev/pdo-wrapper

Update method rewritten to support better updates

18 Dec 02:05
09b0caf
Compare
Choose a tag to compare

Fix ORDER & LIMIT argument type casting.
Bind integers as 'PARAM_INT' when running query - prevent explicit int values (such as in ORDER or LIMIT) from being quoted.

Fix 'update' where $data and $where fields have the same column
Merge array of $data and $where in update will result in omitted data if $data and $where fields have the same columns. Updated to append all passed values, so same columns in $data and $where will now use both values.

updated readme with upgrade guide and examples

19 Apr 23:54
Compare
Choose a tag to compare

release of v2

19 Apr 23:23
Compare
Choose a tag to compare

v2 has a new namespace and instead of calling Database::get() you would use new Database($args)

Also ->select() has been replaced with ->rows(), ->row() or ->run() options.

added the option to use ? placeholders for select

11 Apr 14:08
49e201b
Compare
Choose a tag to compare

v1 release

10 Jan 00:11
Compare
Choose a tag to compare

Some breaking changes have been applied, be warned when upgrading.

To install composer is now required, also PHP 7.2 is the min supported version.

Removed the PHP Constants and instead pass params to get() to setup a connection.

Added a new method:

Delete multiple IN

To delete multiple records where ids are in a specific column, this uses WHERE id IN (4,5,6)

$db->deleteByIds('users', 'id', '4,5,6');