PHPackages                             slim/pdo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. slim/pdo

Abandoned → [faapz/pdo](/?search=faapz%2Fpdo)Library[Framework](/categories/framework)

slim/pdo
========

Just another PDO database library

v2.2.0(4y ago)314266.6k↓38.9%100[3 issues](https://github.com/FaaPz/Slim-PDO/issues)[3 PRs](https://github.com/FaaPz/Slim-PDO/pulls)11MITPHPPHP &gt;=7.2.0CI failing

Since Jul 25Pushed 1y ago22 watchersCompare

[ Source](https://github.com/FaaPz/Slim-PDO)[ Packagist](https://packagist.org/packages/slim/pdo)[ Docs](https://github.com/FaaPz/PDO)[ RSS](/packages/slim-pdo/feed)WikiDiscussions 2.x Synced 2d ago

READMEChangelog (10)Dependencies (3)Versions (28)Used By (11)

PDO
===

[](#pdo)

[![Latest Stable Version](https://camo.githubusercontent.com/b102fa8a75b4ad2fdb5d1c1bac29157167a67974a8e450c30f2f70999324ebd0/68747470733a2f2f706f7365722e707567782e6f72672f666161707a2f70646f2f762f737461626c65)](https://packagist.org/packages/faapz/pdo)[![Total Downloads](https://camo.githubusercontent.com/51bbd37114e7ed2d30eb4993c2df7f54b4b3b980c473fd8fcfe0f4498c2a2667/68747470733a2f2f706f7365722e707567782e6f72672f666161707a2f70646f2f646f776e6c6f616473)](https://packagist.org/packages/faapz/pdo)[![Latest Unstable Version](https://camo.githubusercontent.com/32bd39be5032e7bac6fe389dc7ea44ed224b7831b935911703125e97bed7260a/68747470733a2f2f706f7365722e707567782e6f72672f666161707a2f70646f2f762f756e737461626c65)](https://packagist.org/packages/faapz/pdo)[![License](https://camo.githubusercontent.com/5a11ea35316099021f0f3eaf72b6f0d935a468b1e8ee823d2317af6eb869b0a2/68747470733a2f2f706f7365722e707567782e6f72672f666161707a2f70646f2f6c6963656e7365)](https://packagist.org/packages/faapz/pdo)

Just another PDO database library

### Installation

[](#installation)

Use [Composer](https://getcomposer.org/)

```
$ composer require faapz/pdo
```

### Usage

[](#usage)

Examples selecting, inserting, updating and deleting data from or into `users` table.

```
require_once 'vendor/autoload.php';

$dsn = 'mysql:host=your_db_host;dbname=your_db_name;charset=utf8';
$usr = 'your_db_username';
$pwd = 'your_db_password';

$database = new FaaPz\PDO\Database($dsn, $usr, $pwd);

// SELECT * FROM users WHERE id = ?
$select = $database->select()
                   ->from('users')
                   ->where(new FaaPz\PDO\Clause\Conditional('id', '=', 1234));

if ($insert->execute()) {
    $data = $stmt->fetch();
}

// INSERT INTO users (id , username , password) VALUES (? , ? , ?)
$insert = $database->insert(
                       'id',
                       'username',
                       'password'
                   )
                   ->into('users')
                   ->values(
                       1234,
                       'user',
                       'passwd'
                   );

if ($insert->execute()) {
    $insertId = $database->lastInsertId();
}

// UPDATE users SET pwd = ? WHERE id = ?
$update = $database->update(["pwd" => "your_new_password"])
                   ->table("users")
                   ->where(new FaaPz\PDO\Clause\Conditional("id", "=", 1234));

if (($result = $update->execute()) !== false) {
    $affectedRows = $result->rowCount();
}

// DELETE FROM users WHERE id = ?
$delete = $database->delete()
                   ->from("users")
                   ->where(new FaaPz\PDO\Clause\Conditional("id", "=", 1234));

if (($result = $delete->execute()) !== false) {
    $affectedRows = $result->rowCount();
}
```

> The `sqlsrv` extension will fail to connect when using error mode `PDO::ERRMODE_EXCEPTION` (default). To connect, you will need to explicitly pass `array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)` (or `PDO::ERRMODE_SILENT`) into the constructor, or override the `getDefaultOptions()` method when using `sqlsrv`.

### Documentation

[](#documentation)

See [DOCUMENTATION](docs/README.md)

### Changelog

[](#changelog)

See [CHANGELOG](CHANGELOG.md)

### License

[](#license)

See [LICENSE](LICENSE.md)

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity53

Moderate usage in the ecosystem

Community38

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 61.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~94 days

Recently: every ~206 days

Total

26

Last Release

1641d ago

Major Versions

1.x-dev → v2.0.02019-10-03

PHP version history (3 changes)1.7.0PHP &gt;=5.3.0

v1.12.0PHP &gt;=5.6.0

v2.0.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1536742?v=4)[Fabian de Laender](/maintainers/FaaPz)[@FaaPz](https://github.com/FaaPz)

![](https://www.gravatar.com/avatar/b4908b429b924b015ba7068223413a26bff2ccbe7fdac117662481bd88e20059?d=identicon)[kwhat](/maintainers/kwhat)

---

Top Contributors

[![kwhat](https://avatars.githubusercontent.com/u/676164?v=4)](https://github.com/kwhat "kwhat (99 commits)")[![FaaPz](https://avatars.githubusercontent.com/u/1536742?v=4)](https://github.com/FaaPz "FaaPz (48 commits)")[![scheras](https://avatars.githubusercontent.com/u/7363137?v=4)](https://github.com/scheras "scheras (3 commits)")[![delef](https://avatars.githubusercontent.com/u/2103263?v=4)](https://github.com/delef "delef (2 commits)")[![mridah](https://avatars.githubusercontent.com/u/21169606?v=4)](https://github.com/mridah "mridah (1 commits)")[![Mystael](https://avatars.githubusercontent.com/u/7067059?v=4)](https://github.com/Mystael "Mystael (1 commits)")[![procket-org](https://avatars.githubusercontent.com/u/5643421?v=4)](https://github.com/procket-org "procket-org (1 commits)")[![terah](https://avatars.githubusercontent.com/u/2120322?v=4)](https://github.com/terah "terah (1 commits)")[![bmutinda](https://avatars.githubusercontent.com/u/1729141?v=4)](https://github.com/bmutinda "bmutinda (1 commits)")[![WFrancois](https://avatars.githubusercontent.com/u/5872952?v=4)](https://github.com/WFrancois "WFrancois (1 commits)")[![bnf](https://avatars.githubusercontent.com/u/473155?v=4)](https://github.com/bnf "bnf (1 commits)")[![ismnoiet](https://avatars.githubusercontent.com/u/5025240?v=4)](https://github.com/ismnoiet "ismnoiet (1 commits)")[![kernel64](https://avatars.githubusercontent.com/u/1070435?v=4)](https://github.com/kernel64 "kernel64 (1 commits)")

---

Tags

pdopdo-database-libraryphp-libraryphp72query-builderdatabasesqlpdo

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/slim-pdo/health.svg)

```
[![Health](https://phpackages.com/badges/slim-pdo/health.svg)](https://phpackages.com/packages/slim-pdo)
```

###  Alternatives

[cakephp/database

Flexible and powerful Database abstraction library with a familiar PDO-like API

9826.4M47](/packages/cakephp-database)[yiisoft/db

Database abstraction layer and query builder

215523.3k44](/packages/yiisoft-db)[yiisoft/db-mysql

MySQL/MariaDB driver for Yii Database

43184.0k24](/packages/yiisoft-db-mysql)[yiisoft/db-pgsql

PostgreSQL driver for Yii Database

42174.0k10](/packages/yiisoft-db-pgsql)[yiisoft/db-sqlite

SQLite driver for Yii Database

32198.2k22](/packages/yiisoft-db-sqlite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
