Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Implementation of Yii's CActiveRecord that allows specifying DB table name

branch: master
README.md

Yii-dynamic-active-record

CActiveRecord implementation that allows specifying DB table name instead of creating a class for each table.

Usage

(assuming table 'user' with columns 'id' and 'name'):

$userModel = DynamicActiveRecord::forTable('user');
//list existing users
foreach ($userModel->findAll() as $user)
    echo $user->id . ': ' . $user->name . '<br>';
//add new user
$userModel->name = 'Pavle Predic';
$userModel->save();
Something went wrong with that request. Please try again.