PHPackages                             shinjin/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. [Database &amp; ORM](/categories/database)
4. /
5. shinjin/pdo

ActiveLibrary[Database &amp; ORM](/categories/database)

shinjin/pdo
===========

A PDO wrapper, because the internet needed another PDO wrapper

0.6.3(8y ago)06162MITPHPPHP ^5.6 || ^7.0

Since Feb 14Pushed 8y agoCompare

[ Source](https://github.com/shinjin/pdo)[ Packagist](https://packagist.org/packages/shinjin/pdo)[ Docs](http://github.com/shinjin/pdo)[ RSS](/packages/shinjin-pdo/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (9)Dependencies (3)Versions (10)Used By (2)

Pdo
===

[](#pdo)

[![Build Status](https://camo.githubusercontent.com/b327deb29b46df60193113e79cb0c656d7971a0f71fdf5b0f78b38d137d2c6b0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7368696e6a696e2f70646f2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/shinjin/pdo)[![Coverage Status](https://camo.githubusercontent.com/4281171af4e81b40d9c57f152d3bf8011fce9aed79f7346a9348ee713a0aaae0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7368696e6a696e2f70646f2f62616467652e737667)](https://coveralls.io/github/shinjin/pdo)

A PDO wrapper, because the internet needed another PDO wrapper.

Use shinjin/pdo if you need a thin wrapper that:

- uses arrays to unpack query values
- uses prepared statements to execute queries and bulk operations
- supports upserts (insert or update on duplicate key)
- supports nested transactions

Install
-------

[](#install)

Via Composer

```
$ composer require shinjin/pdo
```

Usage
-----

[](#usage)

```
$connection_parameters = array(
    'driver'   => 'mysql',
    'dbname'   => 'dbtest',
    'user'     => 'shinjin',
    'password' => 'awesomepasswd'
);

$db = new Db($connection_parameters);

$statement  = 'SELECT * FROM guestbook WHERE id = ?';
$parameters = array(1);

$result = $db->query($statement, $parameters)->fetchAll();
```

See [Usage](docs/Usage.md) for a complete list of examples.

Change log
----------

[](#change-log)

See [CHANGELOG](CHANGELOG.md).

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Bugfixes and updates to support new db drivers are welcome. Please submit pull requests to [Github](https://github.com/shinjin/pdo).

Authors
-------

[](#authors)

- [Rick Shin](https://github.com/shinjin)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~6 days

Recently: every ~1 days

Total

9

Last Release

2961d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00f1971319f58286c7ce9dd3fc00a95dc33074f493d355448900ab982ebd61ef?d=identicon)[shinjin](/maintainers/shinjin)

---

Top Contributors

[![shinjin](https://avatars.githubusercontent.com/u/218119?v=4)](https://github.com/shinjin "shinjin (57 commits)")

---

Tags

pdopdo-wrapperphppdopdo-wrapper

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k578.4M5.6k](/packages/doctrine-dbal)[ifsnop/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k5.5M69](/packages/ifsnop-mysqldump-php)[nette/database

💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.

5656.7M234](/packages/nette-database)[dibi/dibi

Dibi is Database Abstraction Library for PHP

5013.8M120](/packages/dibi-dibi)[aura/sql

A PDO extension that provides lazy connections, array quoting, query profiling, value binding, and convenience methods for common fetch styles. Because it extends PDO, existing code that uses PDO can use this without any changes to the existing code.

5632.5M43](/packages/aura-sql)[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4572.9M34](/packages/aura-sqlquery)

PHPackages © 2026

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