PHPackages                             protocollive/phplivedb - 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. protocollive/phplivedb

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

protocollive/phplivedb
======================

A library to easy handling with database

1.1.7(1mo ago)46453MITPHPPHP &gt;=8.1

Since Oct 14Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ProtocolLive/PhpLiveDB)[ Packagist](https://packagist.org/packages/protocollive/phplivedb)[ GitHub Sponsors](https://github.com/ProtocolLive)[ RSS](/packages/protocollive-phplivedb/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (13)Used By (3)

Why PhpLiveDB?
--------------

[](#why-phplivedb)

Using large querys with PDO, you have a lot of fields and placeholders... Using insert with ordered placeholders, it's worse, because you don't know which placeholder is which field...

```
$pdo->prepare("
  insert into users('id', 'name', 'email', 'password', 'address', 'country', 'zipcode', 'telephone', 'gender', 'register_date', 'last_login', 'last_pass_change')
  values(?,?,?,?,?,?,?,?,?,?,?,?)
");
```

That's a simple example. We know there are a lot of bigger queries out there... What if I need to add a new field? Just add the field name and one more placeholder. What if PDO throws an error saying different placeholder fields and numbers? I'd have to count them one by one...

Named placeholders help with this. Okay, but that's a lot of lines to write and manage... This library helps with that:

```
$db->Insert('users')
->FieldAdd('id', $id, Types::Int)
->FieldAdd('name', $name, Types::Str)
->FieldAdd('email', $email, Types::Str)
->FieldAdd('password', $password, Types::Str)
->FieldAdd('address', $address, Types::Str)
->FieldAdd('country', $country, Types::Str)
->FieldAdd('zipcode', $zipcode, Types::Str)
->FieldAdd('telephone', $telephone, Types::Str)
->FieldAdd('gender', $gender, Types::Str)
->FieldAdd('register_date', $register_date, Types::Str)
->FieldAdd('last_login', $last_login, Types::Int)
->FieldAdd('last_pass_change', $last_pass_change, Types::Int)
->Run();
```

This was the initial idea of the library that was expanded according to my needs and today it is a very complete library (if not, feedbacks are welcome) that I use in my daily life and share with the world.

For the documentation, click [here](https://protocollive.github.io/PhpLiveDbDocs/en/).

Install
-------

[](#install)

- Download the library in zip format and use the *src* folder content;
- Via Composer with `composer require protocollive/phplivedb` ([Video](https://youtu.be/UVfc6vN2zho));

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance89

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

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

Every ~47 days

Recently: every ~65 days

Total

12

Last Release

57d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48a3a5d8e60dd343d520cad551ff55d31c9c974337ed7e14d0dde03cf2164c81?d=identicon)[ProtocolLive](/maintainers/ProtocolLive)

---

Top Contributors

[![ProtocolLive](https://avatars.githubusercontent.com/u/39626142?v=4)](https://github.com/ProtocolLive "ProtocolLive (392 commits)")

---

Tags

pdopdo-mysqlpdo-sqlitephp81

### Embed Badge

![Health badge](/badges/protocollive-phplivedb/health.svg)

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

###  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)
