PHPackages                             chillerlan/php-database - 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. chillerlan/php-database

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

chillerlan/php-database
=======================

An extensible database wrapper and query builder.

3.1.0(6y ago)431.2k82MITPHPPHP ^7.2CI failing

Since Jul 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/chillerlan/php-database)[ Packagist](https://packagist.org/packages/chillerlan/php-database)[ Docs](https://github.com/chillerlan/php-database)[ RSS](/packages/chillerlan-php-database/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (8)Versions (11)Used By (2)

chillerlan/php-database
=======================

[](#chillerlanphp-database)

A PHP SQL client and querybuilder for the most common databases, namely: MySQL, PostgreSQL, SQLite3, Microsoft SQL Server (Transact) and Firebird.

[![PHP Version Support](https://camo.githubusercontent.com/577526a4883c5ad05fc5f4e47481e1c082f11505f9279a245ee432e5149d663e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6368696c6c65726c616e2f7068702d64617461626173653f6c6f676f3d70687026636f6c6f723d383839324246266c6f676f436f6c6f723d666666)](https://www.php.net/supported-versions.php)[![version](https://camo.githubusercontent.com/8f71c5a1d703be1f1c6f430309e8810080b5e739860974383cb128ebf1d74918/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368696c6c65726c616e2f7068702d64617461626173652e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d666666)](https://packagist.org/packages/chillerlan/php-database)[![license](https://camo.githubusercontent.com/7bec79f7cfe6c5e2a934603e3b28ad023975326c882256b85ff4af50bc5b75c0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6368696c6c65726c616e2f7068702d64617461626173652e737667)](https://github.com/chillerlan/php-database/blob/main/LICENSE)[![Continuous Integration](https://camo.githubusercontent.com/12d95a4d4a3a22169c43a124b2672110aac6e5a0bdaae67994e4f09e6d390c2f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6368696c6c65726c616e2f7068702d64617461626173652f63692e796d6c3f6272616e63683d6d61696e266c6f676f3d676974687562266c6f676f436f6c6f723d666666)](https://github.com/chillerlan/php-database/actions/workflows/ci.yml?query=branch%3Amain)[![Coverage](https://camo.githubusercontent.com/567c20a476bed8fbdcd9bfa37311059972a4153a642e7b26c626dcb32a96520c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6368696c6c65726c616e2f7068702d64617461626173652e7376673f6c6f676f3d636f6465636f76266c6f676f436f6c6f723d666666)](https://codecov.io/github/chillerlan/php-database)[![Packagist downloads](https://camo.githubusercontent.com/ba1ec5279e455940c8e8ecc57d939141627bdc40695d7e29fbbfec4ced212dc9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368696c6c65726c616e2f7068702d64617461626173652e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d666666)](https://packagist.org/packages/chillerlan/php-database/stats)

Documentation
=============

[](#documentation)

Requirements
------------

[](#requirements)

- PHP 8.2+
- one of the supported databases, set up to work with PHP:
    - [MySQL](https://dev.mysql.com/doc/refman/5.6/en/) (5.5+) / [MariaDB](https://mariadb.com/kb/en/library/basic-sql-statements/) via [ext-mysqli](https://www.php.net/manual/en/book.mysqli.php) or [ext-pdo\_mysql](https://www.php.net/manual/en/ref.pdo-mysql.php)
    - [PostgreSQL](https://www.postgresql.org/docs/9.5/static/index.html) (9.5+) via [ext-pgsql](https://www.php.net/manual/en/book.pgsql.php) or [ext-pdo\_pgsql](https://www.php.net/manual/en/ref.pdo-pgsql.php)
    - [SQLite3](https://www.sqlite.org/lang.html) via [ext-pdo\_sqlite](https://www.php.net/manual/en/ref.pdo-sqlite.php)
    - [Firebird](https://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25.html) (2.5+) via [ext-pdo\_firebird](https://www.php.net/manual/en/ref.pdo-firebird.php)
    - [Microsoft SQL Server](https://www.microsoft.com/en-us/sql-server/sql-server-downloads) ([transact-sql](https://docs.microsoft.com/sql/t-sql/language-reference)) via [ext-sqlsrv or ext-pdo\_sqlsrv](https://github.com/Microsoft/msphpsql)

Installation
------------

[](#installation)

**requires [composer](https://getcomposer.org)**

### *composer.json*

[](#composerjson)

(note: replace `dev-main` with a [version boundary](https://getcomposer.org/doc/articles/versions.md#summary))

```
{
	"require": {
		"php": "^8.2",
		"chillerlan/php-database": "dev-main"
	}
}
```

Profit!

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~83 days

Recently: every ~119 days

Total

10

Last Release

2479d ago

Major Versions

1.0.2 → 2.0.02018-01-24

2.1.0 → 3.0.02018-10-24

PHP version history (3 changes)1.0.0PHP &gt;=7.0.3

2.0.0PHP &gt;=7.2.0

2.0.2PHP ^7.2

### Community

Maintainers

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

---

Top Contributors

[![codemasher](https://avatars.githubusercontent.com/u/592497?v=4)](https://github.com/codemasher "codemasher (209 commits)")

---

Tags

databasefirebirdsqlmysqlodbcpdophpphp-databasephp-libraryphp7postgresqlsqlsqlite3sqlserverdatabasemysqlsqlitepostgresmariadbmssqlquerybuilderquerybuilderdriverfirebird

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chillerlan-php-database/health.svg)

```
[![Health](https://phpackages.com/badges/chillerlan-php-database/health.svg)](https://phpackages.com/packages/chillerlan-php-database)
```

###  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)[catfan/medoo

The lightweight PHP database framework to accelerate development

4.9k1.5M194](/packages/catfan-medoo)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)[tommyknocker/pdo-database-class

Framework-agnostic PHP database library with unified API for MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, and Oracle. Query Builder, caching, sharding, window functions, CTEs, JSON, migrations, ActiveRecord, CLI tools, AI-powered analysis. Zero external dependencies.

845.7k](/packages/tommyknocker-pdo-database-class)[cycle/database

DBAL, schema introspection, migration and pagination

64690.9k31](/packages/cycle-database)[moharrum/laravel-adminer

Adminer database management tool for your Laravel application.

451.0k](/packages/moharrum-laravel-adminer)

PHPackages © 2026

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