How to make customizable Db Table prefixes using ActiveRecord

Comparing #2 with #3

Revision #3 was created by killermonk killermonk on Aug 11, 2009, 12:18:43 AM.

changing a static variable reference to a local variable reference

Content

[...]
// Fetch prefix
$this->tbl_prefix = Yii::app()->params['tablePrefix'];
}

// Prepend prefix, call our new method
return (
self::$$this->tbl_prefix . $this->_tableName());
}

/**
* Function for child classes to implement to return the table name associated with it
*/
[...]