PHPackages                             rockschtar/wordpress-database-fluent - 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. rockschtar/wordpress-database-fluent

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

rockschtar/wordpress-database-fluent
====================================

Fluent WordPress database ($wpdb) wrapper

2.1.2(2y ago)26.9k1MITPHPPHP &gt;=8.2

Since Apr 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/rockschtar/wordpress-database-fluent)[ Packagist](https://packagist.org/packages/rockschtar/wordpress-database-fluent)[ RSS](/packages/rockschtar-wordpress-database-fluent/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (1)Versions (9)Used By (0)

rockschtar/wordpress-database-fluent
====================================

[](#rockschtarwordpress-database-fluent)

Fluent WordPress database ($wpdb) wrapper

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

[](#installation)

You can install the package via composer:

```
composer require rockschtar/wordpress-database-fluent
```

Usage Examples
--------------

[](#usage-examples)

For more information about WordPress Database `wpdb` visit

**$wpdb-&gt;insert**

Insert a row into a table.

```
WPDB::insert()
    ->table('wp_my_table')
    ->data(['column1' => 'hello', 'column2' => 'world', 'column3' => 1])
    ->format(['%s', '%s', '%d'])
    ->execute();
```

**$wpdb-&gt;update**

Update a row in the table

```
WPDB::update()
    ->table('wp_my_table')
    ->data(['column1' => 'hello', 'column2' => 'world', 'column3' => 1])
    ->format(['%s', '%s', '%d'])
    ->where(['column4' => 5])
    ->whereFormat(['%d'])
    ->execute();
```

**$wpdb-&gt;delete**

Delete a row in the table

```
WPDB::delete()
    ->table('wp_my_table')
    ->where(['column4' => 5])
    ->whereFormat(['%d'])
    ->execute();
```

**$wpdb-&gt;query**

Perform a MySQL database query, using current database connection and optional prepares the SQL query for safe execution. Uses sprintf()-like syntax.

```
WPDB::query()
    ->query('SELECT * FROM wp_my_table WHERE column1=%d', [1]);
```

**$wpdb-&gt;get\_results**

Retrieve an entire SQL result set from the database (i.e., many rows) and optional prepares the SQL query for safe execution. Uses sprintf()-like syntax.

```
WPDB::results()
    ->query('SELECT * FROM wp_my_table WHERE column1=%s LIMIT 0, 10', ['abc']);
```

**$wpdb-&gt;get\_var**

Retrieve one variable from the database and optional prepares the SQL query for safe execution. Uses sprintf()-like syntax.

```
WPDB::getVar()
    ->query('SELECT COUNT(*) FROM wp_my_table WHERE column1=%d', [1]);
```

**$wpdb-&gt;get\_row**

Retrieve one row from the database and optional prepares the SQL query for safe execution. Uses sprintf()-like syntax.

```
WPDB::getRow()
    ->query('SELECT column2, column3 FROM wp_my_table WHERE column1=%d', [1]);
```

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

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity74

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

Recently: every ~9 days

Total

7

Last Release

766d ago

Major Versions

1.0.1 → 2.0.02024-04-19

PHP version history (2 changes)1.0.0PHP &gt;=7.1

2.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/87191?v=4)[Stefan Helmer](/maintainers/rockschtar)[@rockschtar](https://github.com/rockschtar)

---

Top Contributors

[![rockschtar](https://avatars.githubusercontent.com/u/87191?v=4)](https://github.com/rockschtar "rockschtar (2 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rockschtar-wordpress-database-fluent/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/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)
