Releases: dcblogdev/pdo-wrapper
Update method rewritten to support better updates
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
v2.0.1 quick reference
release of v2
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
1.1.0 Updated examples
v1 release
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');