Difference between #2 and #4 of
How to make customizable Db Table prefixes using ActiveRecord

Changes

Title unchanged

How to make customizable Db Table prefixes using ActiveRecord

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Content changed

> Note: As of Yii 1.1.x this functionality is integrated into the framework. If you are using 1.1.x please disregard this article and use the built-in functionality.
 
 
> Note: The method described on this page involves extending Core classes to create custom functionality. This method is best used when starting new projects, but can be implemented after a product has been developed. It's just more work to do it later on.

Yii's ActiveRecord classes are powerful, but they fall short when you want to have a configurable table prefix for your application.
[...]
// 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
*/
[...]
0 0
1 follower
Viewed: 24 547 times
Version: 1.1
Category: Tutorials
Tags:
Written by: killermonk
Last updated by: killermonk
Created on: Aug 9, 2009
Last updated: 14 years ago
Update Article

Revisions

View all history