PHPackages                             dblibslim/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. dblibslim/pdo

ActiveLibrary[Framework](/categories/framework)

dblibslim/pdo
=============

PDO database library for Slim Framework

1.8.0(10y ago)01362[3 PRs](https://github.com/edmarbaladeli/Slim-PDO/pulls)MITPHPPHP &gt;=5.3.0

Since Jul 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/edmarbaladeli/Slim-PDO)[ Packagist](https://packagist.org/packages/dblibslim/pdo)[ Docs](https://github.com/FaaPz/Slim-PDO)[ RSS](/packages/dblibslim-pdo/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (7)Used By (0)

Slim-PDO
========

[](#slim-pdo)

PDO database library for Slim Framework

### Installation

[](#installation)

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

```
"require": {
    "dblibslim/pdo": "dev-master"
}
```

### Usage

[](#usage)

Simple example selecting all data from `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';

$pdo = new \Slim\PDO\Database($dsn, $usr, $pwd);

$qry = $pdo->prepare("SELECT * FROM users");

$result = $qry->execute();

try
{
    var_dump($result->fetchAll());
}
catch(\PDOException $e)
{
    exit($e->getMessage());
}
```

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

```
// SELECT * FROM users WHERE id = ?
$selectStatement = $pdo->select()
                       ->from('users')
                       ->where('id', '=', 1234);

$stmt = $selectStatement->execute();
$data = $stmt->fetch();

// INSERT INTO users ( id , usr , pwd ) VALUES ( ? , ? , ? )
$insertStatement = $pdo->insert(array('id', 'usr', 'pwd'))
                       ->into('users')
                       ->values(array(1234, 'your_username', 'your_password'));

$insertId = $insertStatement->execute();

// UPDATE users SET pwd = ? WHERE id = ?
$updateStatement = $pdo->update(array('pwd' => 'your_new_password'))
                       ->table('users')
                       ->where('id', '=', 1234);

$affectedRows = $updateStatement->execute();

// DELETE FROM users WHERE id = ?
$deleteStatement = $pdo->delete()
                       ->from('users')
                       ->where('id', '=', 1234);

$affectedRows = $deleteStatement->execute();
```

### Documentation

[](#documentation)

See [DOCUMENTATION](https://github.com/FaaPz/Slim-PDO/blob/master/docs/README.md)

### Changelog

[](#changelog)

See [CHANGELOG](https://github.com/FaaPz/Slim-PDO/blob/master/CHANGELOG.md)

### License

[](#license)

See [LICENSE](https://github.com/FaaPz/Slim-PDO/blob/master/LICENSE)

###  Health Score

29

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 56.3% 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 ~17 days

Total

4

Last Release

3843d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5551678d6b2ae3bb2c71630b753ddd84c444166f943a568e69efe97d9709bdc0?d=identicon)[edmarbaladeli](/maintainers/edmarbaladeli)

---

Top Contributors

[![edmarbaladeli](https://avatars.githubusercontent.com/u/889440?v=4)](https://github.com/edmarbaladeli "edmarbaladeli (9 commits)")[![FaaPz](https://avatars.githubusercontent.com/u/1536742?v=4)](https://github.com/FaaPz "FaaPz (7 commits)")

---

Tags

frameworkdatabaseslimpdo

### Embed Badge

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

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

###  Alternatives

[slim/twig-view

Slim Framework 4 view helper built on top of the Twig 3 templating component

3707.8M192](/packages/slim-twig-view)[rubellum/slim-blade-view

Slim Framework 3 view helper built on the Blade component

1822.3k2](/packages/rubellum-slim-blade-view)

PHPackages © 2026

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