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.2.3(1w ago)57233MITPHPPHP &gt;=8.1

Since Oct 14Pushed 1w 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 1w ago

READMEChangelogDependenciesVersions (17)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

50

—

FairBetter than 95% of packages

Maintenance98

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

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

Recently: every ~34 days

Total

16

Last Release

12d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39626142?v=4)[Protocol Corporation](/maintainers/ProtocolLive)[@ProtocolLive](https://github.com/ProtocolLive)

---

Top Contributors

[![ProtocolLive](https://avatars.githubusercontent.com/u/39626142?v=4)](https://github.com/ProtocolLive "ProtocolLive (410 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

[jdorn/sql-formatter

a PHP SQL highlighting library

3.8k117.8M121](/packages/jdorn-sql-formatter)[backup-manager/backup-manager

A framework agnostic database backup manager with user-definable procedures and support for S3, Dropbox, FTP, SFTP, and more with drivers for popular frameworks.

1.7k1.6M11](/packages/backup-manager-backup-manager)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M88](/packages/propel-propel1)[insolita/yii2-migration-generator

Set of gii tools for generating files for migration by schema of table , phpdoc or table data

108508.0k5](/packages/insolita-yii2-migration-generator)[xpdo/xpdo

A PDO-based Object/Relational Bridge Library

7088.4k4](/packages/xpdo-xpdo)[voku/session2db

A PHP library acting as a wrapper for PHP's default session handling functions which stores data in a MySQL database, providing both better performance and better security and protection against session fixation and session hijacking.

2920.0k](/packages/voku-session2db)

PHPackages © 2026

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