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

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

awesome9/database
=================

An expressive WordPress SQL query builder.

v1.0.7(1y ago)039GPL-3.0-or-laterPHPPHP &gt;=5.6

Since Jan 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AwesomeNine/Database)[ Packagist](https://packagist.org/packages/awesome9/database)[ RSS](/packages/awesome9-database/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (8)DependenciesVersions (9)Used By (0)

Database
========

[](#database)

[![Awesome9](https://camo.githubusercontent.com/3c0c2d9b4a52297ff7faaf49e147ee8e6e96e0f435b798a6215c2e50ebc6bde3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f417765736f6d652d392d627269676874677265656e)](https://awesome9.co)[![Latest Stable Version](https://camo.githubusercontent.com/a96c113eb1349499eafb0ec9effc749169cbbc1cba876ff9c8a76a08de55f280/68747470733a2f2f706f7365722e707567782e6f72672f617765736f6d65392f64617461626173652f762f737461626c65)](https://packagist.org/packages/awesome9/database)[![PHP from Packagist](https://camo.githubusercontent.com/2c0dfc7b53d515701e5416fb306bd8796f5a681fd610f77bdce8cd6817e84681/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f617765736f6d65392f64617461626173652e737667)](https://packagist.org/packages/awesome9/database)[![Total Downloads](https://camo.githubusercontent.com/3ba1e5824b63a2cb01a870aa72e9e41df2b2e8c83aeef5c08564664248b503b0/68747470733a2f2f706f7365722e707567782e6f72672f617765736f6d65392f64617461626173652f646f776e6c6f616473)](https://packagist.org/packages/awesome9/database)[![License](https://camo.githubusercontent.com/c7558b20de55c455bd44c8e34f602c536fd69322d2768ef113396989ff9b0cab/68747470733a2f2f706f7365722e707567782e6f72672f617765736f6d65392f64617461626173652f6c6963656e7365)](https://packagist.org/packages/awesome9/database)

 [![](https://camo.githubusercontent.com/5c18f6626f8293d759851fd91dd6dc66472b50ff4abef968250c877698e54bed/68747470733a2f2f696d672e69636f6e73382e636f6d2f6e6f6c616e2f3235362f64617461626173652e706e67)](https://camo.githubusercontent.com/5c18f6626f8293d759851fd91dd6dc66472b50ff4abef968250c877698e54bed/68747470733a2f2f696d672e69636f6e73382e636f6d2f6e6f6c616e2f3235362f64617461626173652e706e67)

📃 About Database
----------------

[](#-about-database)

This package is an expressive query builder for WordPress, it ease the SQL generation and takes care of sanitization of data as well.

### Data Sanitisation

[](#data-sanitisation)

The purpose of this library is to provide an **expressive** and **safe**\* way to run queries against your WordPress database (typically involving custom tables).

To this end all **values** provided are escaped, but note that **column and table**names are not yet escaped. In any case, even if they were you should be whitelisting any allowed columns/tables: otherwise using user-input, or other untrusted data to determine the column/table could allow an attacker to retrieve data they shouldn't or generate a map of your database.

---

💾 Installation
--------------

[](#-installation)

```
composer require awesome9/database
```

🕹 Usage
-------

[](#-usage)

For complete usage details goto [documentation](https://github.com/AwesomeNine/Database/wiki)

```
include('vendor/autoload.php');

$select = new Awesome9\Database\select( 'unique_query_id', 'users' );

$select->where( 'id', 2 )
  ->orderBy( 'id', 'desc' )
  ->limit( 20 )
  ->execute();
```

📖 Changelog
-----------

[](#-changelog)

[See the changelog file](./CHANGELOG.md)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.9% 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 ~191 days

Recently: every ~288 days

Total

8

Last Release

665d ago

### Community

Maintainers

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

---

Top Contributors

[![meshakeeb](https://avatars.githubusercontent.com/u/1378876?v=4)](https://github.com/meshakeeb "meshakeeb (14 commits)")[![shakeeb-mts](https://avatars.githubusercontent.com/u/22878349?v=4)](https://github.com/shakeeb-mts "shakeeb-mts (9 commits)")

### Embed Badge

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

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M117](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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