dbfit / pdo
PDO database library for any project php
1.0.3
2017-01-07 23:29 UTC
Requires
- php: >=7.0
- ext-pdo: *
This package is not auto-updated.
Last update: 2025-04-10 22:01:18 UTC
README
Facilitating day-to-day SQL queries with PDO.
ATTENTION: it's a experimental version. Don't use it in production.
INSTALLATION
composer require dbfit/pdo
USAGE
Simple queries:
$dbfit = new Dbfit($host, $user, $password, $database); $result = $dbfit->query("SELECT * FROM users");
Transactions queries:
$dbfit->getConnection()->beginTransaction(); $dbfit->query($sql); $dbfit->query($sql); $dbfit->query($sql); $dbfit->getConnection()->endTransaction();
You can cancel a transaction using $dbfit->getConnection()->cancelTransaction();
Changelog
- v1.0.3
- Adding flexybility with
prepareQuery
method
- Adding flexybility with
- v1.0.2
- Some bugfixes at
ConnectionManager
- Some bugfixes at
- v1.0.1
- Fixing
composer.json
- Fixing
- v1.0.0
- Initial version
Roadmap
select
method that returns result datainsert
method that returnsinsert_id
update
method that returns number of affected rowsdelete
method that returns number of affected rows- Other auxiliar methods:
join
,where
,groupBy
,having
,orderBy
limit
,offset
- Aggregates methods:
count
,distinctCount
,max
,min
,avg
,sum