PHPackages                             notyes/php-active-record - 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. notyes/php-active-record

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

notyes/php-active-record
========================

Stand Alone Active Record Library. CodeIgniter's ActiveRecord and Database Library from 3.0RC2, without the rest of CodeIgniter

v0.1.1(9y ago)0541MITPHPPHP &gt;=5.3.3

Since Dec 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/notyes/php-active-record)[ Packagist](https://packagist.org/packages/notyes/php-active-record)[ RSS](/packages/notyes-php-active-record/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

Standalone Active Record
========================

[](#standalone-active-record)

Based on the [CodeIgnitor](https://github.com/bcit-ci/CodeIgniter) database implementation This takes the ActiveRecord and Database Library from 3.0 and makes it work without the rest of CodeIgniter.

Setup
-----

[](#setup)

composer require notyes/php-active-record dev-master

Usage
-----

[](#usage)

```
// Include
use ActiveRecord\ActiveDatabase;

...

// Create Database configs
$db_config = array(
    'hostname' => "localhost",
    'username' => "username",
    'password' => "password",
    'database' => "database_name",
    'dbdriver' => "mysql",
    'pconnect' => FALSE,
    'db_debug' => TRUE
);

// Add Config and give it a name
ActiveDatabase::addConfig("read", $db_config);

//Use the named connection
$query = ActiveDatabase::get("read")->get('table_name')
$row = $query->result_array();
print_r($row);
```

Documentation
-------------

[](#documentation)

For more on how to use active records: Refer CodeIgnitor's reference documentation at:

[Database Reference](http://www.codeigniter.com/userguide3/database/index.html)

```
$this->db
```

gets replaced by

```
ActiveDatabase::get("db_reference_name")
```

Contributions
-------------

[](#contributions)

Thanks to the base setup by Documentopia.com

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

2

Last Release

3532d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3487997?v=4)[Chas Williams](/maintainers/abstract)[@abstract](https://github.com/abstract)

---

Top Contributors

[![sujayjaju](https://avatars.githubusercontent.com/u/1681240?v=4)](https://github.com/sujayjaju "sujayjaju (10 commits)")[![DevelopmentVSDevs](https://avatars.githubusercontent.com/u/842915?v=4)](https://github.com/DevelopmentVSDevs "DevelopmentVSDevs (9 commits)")[![notyes](https://avatars.githubusercontent.com/u/2021744?v=4)](https://github.com/notyes "notyes (4 commits)")

### Embed Badge

![Health badge](/badges/notyes-php-active-record/health.svg)

```
[![Health](https://phpackages.com/badges/notyes-php-active-record/health.svg)](https://phpackages.com/packages/notyes-php-active-record)
```

###  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)[pgvector/pgvector

pgvector support for PHP

198628.3k10](/packages/pgvector-pgvector)

PHPackages © 2026

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