Download the PHP package decmuc/pdodb without Composer
On this page you can find all versions of the php package decmuc/pdodb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Rated 5.00 based on 2 reviews
Informations about the package pdodb
PDOdb – A Secure MySQL Query Builder for PHP 8+
PDOdb is a modern database wrapper built on top of PDO. It gives you a clean, expressive API for building queries without writing raw SQL by hand – while staying safe, strict and fast by default.
Inspired by ThingEngineer/MySQLiDb, but rewritten from scratch for PDO with full type-safe WHERE methods, strict injection protection and a fluent or step-by-step API – your choice.
📘 Documentation: https://DocsPDOdb.decmuc.dev
Why PDOdb?
Because writing $pdo->prepare("SELECT...") for the hundredth time is boring – and forgetting to bind a parameter is how things go wrong.
PDOdb handles the boring parts. You write what you mean:
No manual prepare, no manual bind, no white screen on error. Exceptions all the way.
Installation
Or download manually – PDOdb is a single file.
Quick Start
Both styles work – use whichever fits your code:
Features
- ✅ Type-safe WHERE methods –
whereInt(),whereFloat(),whereString(),whereBool(),whereDate(),whereLike(),whereSoundsLike()and more - ✅ Prepared statements – all values are bound automatically, never interpolated
- ✅ Heuristic injection check – blocks obvious attack patterns like
1 OR 1=1before they even reach the DB - ✅ Fluent or step-by-step API – both work, both produce the same SQL
- ✅ WHERE grouping –
whereGroup()for parenthesized conditions - ✅ Joins & subqueries – with prefix support and aliasing
- ✅ Transactions –
startTransaction(),commit(),rollback() - ✅ Bulk insert & pagination –
insertBulk(),paginate() - ✅ Table prefix – set once, applied everywhere automatically
- ✅ Multiple instances – connect to several databases side by side
- ✅ Named placeholders in
rawQuery()– both:nameandnamestyle - ✅ Debug & trace –
setTrace(true),getLastDebugQuery(), debug levels 0–3
A Few More Examples
Error Handling
PDOdb throws real exceptions – no more white screens, no more silent failures.
Roadmap
v1.4.0 (current)
whereLike()/whereNotLike()with wildcard modes (both,left,right,none)whereSoundsLike()using MySQLSOUNDS LIKEwhereGroup()/openWhereGroup()/closeWhereGroup()for parenthesized conditions- Named placeholders in
rawQuery() - Several bug fixes (JOIN prefix, subquery bind params,
copy()with PDO)
v2.0.0 (planned)
- Multi-driver support: PostgreSQL, SQLite (and later MSSQL)
- Same API, different dialects internally – your code stays the same
- Compatibility table per method in the docs (✅ MySQL ✅ PostgreSQL ⚠️ SQLite)
Documentation
Full documentation with examples for every method: 👉 https://DocsPDOdb.decmuc.dev
License
MIT – see LICENSE for details.
Built with ❤️ by L. Fischer (decMuc)