In a project I am working on I need to set a table prefix for the project which I can change later. Browsing through the docs I came across this : http://www.yiiframework.com/doc/api/1.1/CDbConnection#tablePrefix-detail
But it is not explained where I implement this. I mean should I put it in protected/config/main.php or edit the core files ?
You put it in the config file, along with other db configuration, like this:
'db'=>array(
'connectionString' => 'xxxxx',
'username' => 'xxxxx',
'password' => 'xxxxx',
'tablePrefix' => 'tbl_',
),
All public properties of any component can be set in the config file this way.