PHPackages                             xjuvi/pdodb - 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. xjuvi/pdodb

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

xjuvi/pdodb
===========

Modern, secure and fully compatible PDO-based replacement for ThingEngineer’s PHP-MySQLi-Database-Class

2.1.0(2mo ago)286↑145.5%MITPHPPHP &gt;=8.1

Since Jul 2Pushed 2mo agoCompare

[ Source](https://github.com/xJuvi/PDOdb)[ Packagist](https://packagist.org/packages/xjuvi/pdodb)[ RSS](/packages/xjuvi-pdodb/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)DependenciesVersions (22)Used By (0)

PDOdb – A Secure, Powerful MySQL Engine for PDO (PHP 8+)
========================================================

[](#pdodb--a-secure-powerful-mysql-engine-for-pdo-php-8)

[![Github stars](https://camo.githubusercontent.com/b11b228ef4173d233e0438aeea14034ca3956cfd9f90870a64ef6b6be38069cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f786a7576692f70646f64623f6c6162656c3d476974487562253230737461727326636f6c6f723d303037656336267374796c653d666c61742d737175617265)](https://github.com/xjuvi/pdodb)[![Latest Version](https://camo.githubusercontent.com/6c2c69bdb6a24d946750099728c9391e55741e8d6061452c176a4bb59d756ee6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f786a7576692f70646f64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xjuvi/pdodb)[![Total Downloads](https://camo.githubusercontent.com/48acafa719a8aed26ccfa8b4de96855e9f3d41b609a515158dcbf9a0b3831d9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f786a7576692f70646f64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xjuvi/pdodb)[![Open issues](https://camo.githubusercontent.com/103a3a623f67353eed391a4da38460225c7986ff431d8a3ac958184209b76a27/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f786a7576692f70646f64623f6c6162656c3d4f70656e253230697373756573267374796c653d666c61742d737175617265)](https://github.com/xjuvi/pdodb/issues)[![license](https://camo.githubusercontent.com/850eae1099d2b05f53383473d7cd51f9bc1ab09b7d0d9e5122f1dd930efdcc6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e737667)](https://github.com/xjuvi/pdodb/blob/master/LICENSE)

PDOdb is a modern database wrapper and SQL builder for PHP 8+, built on top of PDO.
It offers full support for secure query building, prepared statements, dynamic joins, subqueries, transactions, and strict validation.

🔒 Safe by default.
⚙️ Fast, clean, extendable.
📘 Documentation:
👉

---

Features
--------

[](#features)

- Intuitive query builder (`get()`, `insert()`, `update()`, `delete()`)
- Smart `where*()` methods with type validation
- Nested queries, joins, subqueries, aliases
- Safe ORDER/GROUP clause parsing with heuristics
- Locking, transactions, pagination, bulk insert
- Inspired by [ThingEngineer/MySQLiDB](https://github.com/ThingEngineer/MysqliDb), but built for PDO with a similar API and strict SQL injection protection.

---

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

[](#installation)

```
composer require xjuvi/pdodb
```

---

Quick Example
-------------

[](#quick-example)

Two lines for 90% of queries. MySQL-first, prepared by default—no manual prepare() or binding.

```
$db->whereInt('id', 42);
$user = $db->getOne('users');

// Booleans made easy
$db->whereBool('status', true);
$users = $db->get('users');
// In short:
$users = $db->whereBool('status', true)->get('users');
// whereBool('status', 1) + get('users') is equivalent to
// SELECT * FROM users WHERE status = 1.
// false → 0 (or FALSE)
$users = $db->whereBool('status', false)->get('users');
// SELECT * FROM `users` WHERE `status` = 0

// Chaining with other conditions
$users = $db->whereBool('is_active', true)
   ->where('role', 'admin')
   ->orderBy('created_at', 'DESC')
   ->get('users');
```

For comprehensive documentation and more examples, visit the PDOdb docs:

---

📝 License / Lizenz
------------------

[](#-license--lizenz)

This project is licensed under the MIT License. See [LICENSE](LICENSE) for details

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance88

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.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 ~18 days

Recently: every ~70 days

Total

17

Last Release

61d ago

Major Versions

v1.3.8 → v2.0.02026-03-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b1f3c616944599fb62c1d7e2ca4a78e7d5538edf3604f4c75e4808b0014cc4c?d=identicon)[xJuvi](/maintainers/xJuvi)

---

Top Contributors

[![decMuc](https://avatars.githubusercontent.com/u/63890391?v=4)](https://github.com/decMuc "decMuc (88 commits)")[![xJuvi](https://avatars.githubusercontent.com/u/31671206?v=4)](https://github.com/xJuvi "xJuvi (11 commits)")

---

Tags

databaseormpdowrappermysqlithingengineer

### Embed Badge

![Health badge](/badges/xjuvi-pdodb/health.svg)

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

###  Alternatives

[sergeytsalkov/meekrodb

The Simple PHP/MySQL Library

340402.6k12](/packages/sergeytsalkov-meekrodb)[bephp/activerecord

micro activerecord library in PHP(only 400 lines with comments), support chain calls and relations(HAS\_ONE, HAS\_MANY, BELONGS\_TO).

1162.1k2](/packages/bephp-activerecord)[flightphp/active-record

Micro Active Record library in PHP, support chain calls, events, and relations.

163.6k11](/packages/flightphp-active-record)

PHPackages © 2026

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