PHPackages                             mezon/pdocrud - 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. mezon/pdocrud

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

mezon/pdocrud
=============

Simple PDO wrapper

1.6.0(3y ago)410.6k3MITPHPPHP &gt;=7.2.0CI failing

Since Feb 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/alexdodonov/mezon-pdocrud)[ Packagist](https://packagist.org/packages/mezon/pdocrud)[ Docs](https://github.com/alexdodonov/mezon-pdocrud)[ RSS](/packages/mezon-pdocrud/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (4)Versions (47)Used By (3)

Database support
================

[](#database-support)

[![Build Status](https://camo.githubusercontent.com/9d4ec4a739b4b1a6f5b2eb67037558a5fd1294e7ac8384c9985014263ad4932e/68747470733a2f2f7472617669732d63692e636f6d2f616c6578646f646f6e6f762f6d657a6f6e2d70646f637275642e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/alexdodonov/mezon-pdocrud) [![codecov](https://camo.githubusercontent.com/834f6b2c93cab963a7a4219a66e4b8252f4049f2f4e5837af466a5797f190785/68747470733a2f2f636f6465636f762e696f2f67682f616c6578646f646f6e6f762f6d657a6f6e2d70646f637275642f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/alexdodonov/mezon-pdocrud) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/8766449c06d3fa007e35ce3edf26e31cca679e6c3081f8ecd8eab7aa88fef3ac/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c6578646f646f6e6f762f6d657a6f6e2d70646f637275642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alexdodonov/mezon-pdocrud/?branch=master)

Intro
-----

[](#intro)

Mezon built-in classes support varios databases using PDO extension of the PHP language.

Detail
------

[](#detail)

The following databases are supported:

- CUBRID
- MS SQL Server
- Firebird
- IBM
- Informix
- MySQL
- MS SQL Server
- Oracle
- ODBC and DB2
- PostgreSQL
- SQLite
- 4D

PDO objects are wrapped with ProCrud class wich will help you to create simple CRUD routine.

For example:

```
$dataConnection = [
    'dns' => 'mysql:host=localhost;dbname=testdb' ,
    'user' => 'user' ,
    'password' => 'password'
];

$crud = new \Mezon\PdoCrud\PdoCrud();
$crud->connect( $dataConnection );

// fetching fields id and title from table test_table where ids are greater than 12
$crud->prepare('SELECT * FROM test_table WHERE id > :id');

// result stores array of anonimous object
$result = $crud->execSelect(['id' => '12']);
```

Deleting records
----------------

[](#deleting-records)

Deleting routine is quite simple:

```
$crud->delete(
	'table_name' , // table name
	'id > 10' ,    // WHERE statement
	10             // number of records to delete
);
```

Inserting records
-----------------

[](#inserting-records)

Inserting routine is also very simple:

```
$crud->insert(
	'table_name' ,                 // table name
	[ 'f1' => 1 , f2 => '2' ] // new values for fields f1 and f2
);
```

Updating records
----------------

[](#updating-records)

Updating routine is also very simple:

```
$crud->update(
	'table_name' ,                   // table name
	[ 'f1' => 1 , f2 => '2' ] , // new values for fields f1 and f2
	'id > 10'                        // WHERE statement
);
```

Transaction and thread safety
-----------------------------

[](#transaction-and-thread-safety)

You can lock tables and work with transactions.

```
$crud->lockTables( [ 'table1' , 'table2' ] , [ 'READ' , 'WRITE' ] );
$crud->startTransaction();

// perform some changes in database

// then commit these changes
$crud->commit();

// or rollback them
// $crud->commit();

$crud->unlockTables();
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

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

Recently: every ~17 days

Total

46

Last Release

1100d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14943896?v=4)[alexdodonov](/maintainers/alexdodonov)[@alexdodonov](https://github.com/alexdodonov)

---

Top Contributors

[![alexdodonov](https://avatars.githubusercontent.com/u/14943896?v=4)](https://github.com/alexdodonov "alexdodonov (74 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mezon-pdocrud/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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