PHPackages                             chanhong/pdolite - 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. chanhong/pdolite

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

chanhong/pdolite
================

database lite classes for mysql, sqlsrv, sqlite, odbc, pdo (mysql, sqlite, sqlsrv)

0129PHP

Since Dec 18Pushed 8y agoCompare

[ Source](https://github.com/chanhong/pdolite)[ Packagist](https://packagist.org/packages/chanhong/pdolite)[ RSS](/packages/chanhong-pdolite/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PdoLite
=======

[](#pdolite)

Very lite PDO database class with lite query builder and SIDU (Select, Insert, Delete, Update).

One class file with the size of 22 KB.

You can also use all the native PDO methods:

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

[](#installation)

$ ./composer.phar require chanhong/pdolite 1.0.x-dev

Usage
-----

[](#usage)

Use Case: Use with Slim 3 modify 3 files: settings.php, dependencies.php and index.php
--------------------------------------------------------------------------------------

[](#use-case-use-with-slim-3-modify-3-files-settingsphp-dependenciesphp-and-indexphp)

You can download the sample application of Slim 3 using PdoLite here:

In settings.php

```
    'pdolite' => [
        'dsn' => 'mysql:host=localhost;dbname=bookshelf;charset=utf8',
        'username' => 'user',
        'password' => 'password',
    ],

```

In dependencies.php

use PdoLite\\PdoLite; // Database $container\['pdolite'\] = function ($c) { PdoLite::$cfg = $settings = $c-&gt;get('settings')\['pdolite'\];
$conn = PdoLite::dbConnect($settings\['dsn'\],$settings\['username'\],$settings\['password'\]); return $conn;
};

In your index.php

// Register the database connection with PdoLite $pdolite = $app-&gt;getContainer()-&gt;get('pdolite');

In any of your php file that you want to use PdoLite

```
    return PdoLite::select("authors");

```

Use Case: Use with your own code:
---------------------------------

[](#use-case-use-with-your-own-code)

//Sample dsn

Please see settings-dist.php

// Sample code using New Ojbect call

dbConnect($dsn,$username,$password); print\_r($conn-&gt;dbFetchAssoc($sql)); // Sample code using static call PdoLite::pln(PdoLite::select("authors", \['type'=&gt;'assoc'\]),"select"); $sqlUpdList = \['biography'=&gt;'test'\]; PdoLite::pln(PdoLite::update("authors", \['fl'=&gt;$sqlUpdList, 'where'=&gt;'id=1'\]),"update"); Please see testcase.php for more detail PHPUnit Usage ------------- cd pdolite phpunit test\\PdoLiteTest.php

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/21ed298f36dfc2c475157b5bdcb9e37f62886c99bd62e60c8335a3a45cae751f?d=identicon)[chanhong](/maintainers/chanhong)

---

Top Contributors

[![chanhong](https://avatars.githubusercontent.com/u/1286631?v=4)](https://github.com/chanhong "chanhong (3 commits)")

### Embed Badge

![Health badge](/badges/chanhong-pdolite/health.svg)

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

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