PHPackages                             phpdudimanche/db - 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. phpdudimanche/db

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

phpdudimanche/db
================

DB wrapper in PHP (pdo, mysqli)

00.00(9y ago)118PHPPHP ^5.3.3 || ^7.0

Since Nov 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/phpdudimanche/db)[ Packagist](https://packagist.org/packages/phpdudimanche/db)[ RSS](/packages/phpdudimanche-db/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

DataBaseConnection Wrapper
==========================

[](#databaseconnection-wrapper)

A simple PHP DataBase Connection Library Wrapper. The goal is to be simple and to be close the native libraries : mysqli, pdo.

Principle
---------

[](#principle)

The goal is to have the less to maintain. If you have known different versions of php, of Pear db and mdb2... you know it is unpleasant to update large code sections.

Use
---

[](#use)

There are two versions :

- procedural DB :

> $conn = connect();

- object DB with prepared statements :

> $myDB= new $db;
> $connection=$myDB-&gt;connect();

Param
-----

[](#param)

The config file contains your connection params :

> $host="";
> $database="";
> $user="";
> $pass="";

These variable names are used in connect() function. So, if names are differents, change it in these two places.

In the procedural example, a global name is used to use connection : $conn = connect(). If you change this param name, in procedural you have to change this name in all function.

In order to switch beetween PDO and mysqli :

> $db= 'pdo';// OR 'mysqli'

You or i have just the lib to maintain. And to ensure this is correctly maintenaid beetween mysqli and pdo, in POO there is an interface.

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

[](#installation)

You have just to include this lib, as dir (or as a composer package - ). In your composer.json file in your root, add :

> ```
>  "require": {
>    "phpdudimanche/db": "00.00"
> },
> 	"autoload": {
>   "psr-4": {
>   	"Phpdudimanche\\Db\\": "phpdudimanche/poo/"
>   	}
>   }
>
> ```

In your composer console write :

> ```
> composer update
>
> ```

Test
----

[](#test)

With each version, you have a test file, just to run and to see. No testing tool needed. Tests can be used as examples.

WARNING : there are three potential bugs :

- autoincrement (depends on your config : browser, VPN)
- rollback (depends on your config : autocommit, server)
- transaction (mysqli REPORT\_ALL used in transaction test finds a fatal error in query "select \* from tablename").

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3523d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10109214?v=4)[Julien GONTIER](/maintainers/phpdudimanche)[@phpdudimanche](https://github.com/phpdudimanche)

---

Top Contributors

[![phpdudimanche](https://avatars.githubusercontent.com/u/10109214?v=4)](https://github.com/phpdudimanche "phpdudimanche (10 commits)")

### Embed Badge

![Health badge](/badges/phpdudimanche-db/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/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)
