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

ActiveLibrary[Framework](/categories/framework)

kifu-alfi/pdo
=============

PDO database library for Slim Framework

v1.0.2(2y ago)02.4k↓100%MITPHPPHP &gt;=5.3.0

Since Nov 5Pushed 2y agoCompare

[ Source](https://github.com/kifu-alfi/pdo)[ Packagist](https://packagist.org/packages/kifu-alfi/pdo)[ Docs](https://github.com/FaaPz/Slim-PDO)[ RSS](/packages/kifu-alfi-pdo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Slim-PDO
========

[](#slim-pdo)

[![Latest Stable Version](https://camo.githubusercontent.com/a360570e4ba07555f91929e2fe8adbd0bf0a836293e309d56c575b84059805bf/68747470733a2f2f706f7365722e707567782e6f72672f736c696d2f70646f2f762f737461626c65)](https://packagist.org/packages/slim/pdo)[![Total Downloads](https://camo.githubusercontent.com/bc74f9bc7ae28967ec2018f51e7e2b795741b58e3c86ecf9f4b6651941d45b18/68747470733a2f2f706f7365722e707567782e6f72672f736c696d2f70646f2f646f776e6c6f616473)](https://packagist.org/packages/slim/pdo)[![Latest Unstable Version](https://camo.githubusercontent.com/c197852a62877f7356b44c7b4b4399f6fa25281af91e5c78c1c9638a91ab9bbb/68747470733a2f2f706f7365722e707567782e6f72672f736c696d2f70646f2f762f756e737461626c65)](https://packagist.org/packages/slim/pdo)[![License](https://camo.githubusercontent.com/03c96b8c9d51bb29111021b544c2b0c0bb7c6ec50baedc4bf77ea1fe8262c96a/68747470733a2f2f706f7365722e707567782e6f72672f736c696d2f70646f2f6c6963656e7365)](https://packagist.org/packages/slim/pdo)

PDO database library for Slim Framework

### Installation

[](#installation)

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

```
"require": {
    "slim/pdo": "~1.10"
}
```

### 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';

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

// 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(false);

// 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();
```

> 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](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

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~1186 days

Total

2

Last Release

825d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/352d5f78f791e20546ef702e3c039b8b5fdf06709822398724a6563ae0a684c7?d=identicon)[kifu-alfi](/maintainers/kifu-alfi)

---

Top Contributors

[![kukkjanos](https://avatars.githubusercontent.com/u/11735528?v=4)](https://github.com/kukkjanos "kukkjanos (1 commits)")[![Toushe](https://avatars.githubusercontent.com/u/11380860?v=4)](https://github.com/Toushe "Toushe (1 commits)")

---

Tags

frameworkdatabaseslimpdofork

### Embed Badge

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

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

###  Alternatives

[rubellum/slim-blade-view

Slim Framework 3 view helper built on the Blade component

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

PHPackages © 2026

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