PHPackages                             anovsiradj/ci3db - 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. anovsiradj/ci3db

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

anovsiradj/ci3db
================

Standalone CodeIgniter3 DataBase Query Builder with monkey-patched technique.

v1.0.0(7y ago)2563MITPHP

Since May 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/anovsiradj/ci3db)[ Packagist](https://packagist.org/packages/anovsiradj/ci3db)[ RSS](/packages/anovsiradj-ci3db/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

CI3DB
=====

[](#ci3db)

Standalone CodeIgniter3 DataBase Query Builder with monkey-patched technique.

### Usage

[](#usage)

```
// IMPORTANT: "BASEPATH" must end with slash or directory separator.
define('BASEPATH', 'path/to/vendor/codeigniter/framework/system/'); // relative
define('BASEPATH', realpath('/path/to/vendor/codeigniter/framework/system') . DIRECTORY_SEPARATOR); // absolute

$ci3db =& \anovsiradj\CI3DataBase::init();

$ci3db->set_db_config_file('path/to/config/database.php'); // see ./tests/cfg.php
// or
$ci3db->set_db_config('db-server-0', array(
	...
	'dbdriver' => '...',
	'hostname' => 'localhost',
	'username' => 'root',
	'password' => 'root',
	'database' => '...',
	...
));
// or
$ci3db->set_db_config('db-server-1', 'dbdriver://username:password@hostname/database');

// Using the query builder
$db =& $ci3db->db(); // or
$db =& $ci3db->db('db-server-0'); // or
$db =& \anovsiradj\CI3DataBase::db(); // or
$db =& \anovsiradj\CI3DataBase::db('db-server-1');
```

### Development

[](#development)

tested on `5.6+`,`7.0+` and `7.2+`.

probably work on `5.4.8+` (see ).

tested with `MySQL`, `SQLite` and `FirebirdSQL`.

### Caveats

[](#caveats)

`dbutil()` is not supported.

`dbforge()` is not supported.

DB Cache is not supported.

`DSN` you must provide `host` (even for `sqlite3`).

### Todo(s)

[](#todos)

- Test driver `PDO`
- Test `PostgreSQL`

License
=======

[](#license)

[MIT](https://anovsiradj.mit-license.org/2017-2019)

[CodeIgniter3 License](https://github.com/bcit-ci/CodeIgniter/blob/develop/user_guide_src/source/license.rst)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

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

Total

5

Last Release

2630d ago

Major Versions

0.3.1 → v1.0.02019-04-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/cf003abc7ef62fbd4b1445a47f1045ba470d642b45c3cb0f06e924c8c89ccf45?d=identicon)[anovsiradj](/maintainers/anovsiradj)

---

Top Contributors

[![anovsiradj](https://avatars.githubusercontent.com/u/6737021?v=4)](https://github.com/anovsiradj "anovsiradj (27 commits)")

---

Tags

codeignitercodeigniter3composerfirebirdfirebirdsqlmysqlmysqliphpphp5php7query-buildersql-query-buildersqlitesqlite3

### Embed Badge

![Health badge](/badges/anovsiradj-ci3db/health.svg)

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

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

PHPackages © 2026

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