tablePrefix in 1.1 not working

Hello, noob to the framework. I am having trouble getting the tablePrefix setting to work.

I add this to the db array in config/main.php

‘tablePrefix’ => ‘bl_’,

The way I am testing if it works (which may be where I have my problem)… is this:


[*]I have the user module loaded

[*]I go to user/install

[*]click install

[*]run show tables;

[*]and none of the tables created by user module have the prefix


Am I doing something wrong? Thanks for your help

I also facing table prefix problem.

I had configure config/main.php ‘tablePrefix’=>‘pre_’, and then use the query like this :

$sql=‘SELECT * FROM {{user}}’; (

But I fail to do it.

The i print the connection resource and i notice that table prefix param is null.

$connection = new CDbConnection($connStr, $user, $pass);


[tablePrefix] => //no value

Anyone know how to solve it?

check how it works in yii blog demo.

For those who still encounter this problem, can refer below:

$tablePrefix = Yii::app()->db->tablePrefix;

$conn = new CDbConnection($connStr, $user, $pass);

$conn->tablePrefix = $tablePrefix;