I am getting this error,
3559
Here is code from Users model
class Users extends CActiveRecord {
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return Users the static model class
*/
public static function model($className = __CLASS__) {
return parent::model($className);
}
/**
* @return database associated with this model
* Caution: User only in-case DB is different from primary source
*/
public function getDbConnection() {
/* Secondary DB */
return Yii::app()->paytm;
}
/**
* @return string the associated database table name
*/
public function tableName() {
return 'customer_registration';
}
public function primaryKey() {
return 'customer_registrationID';
}
In my config/main.php file
.
.
'components' => array(
.
.
'db' => array(
'connectionString' => 'mysql:host=localhost;dbname=sso',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
'enableProfiling' => true,
'enableParamLogging' => true,
),
'paytm' => array(
'class' => 'CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=paytm',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
'enableProfiling' => true,
'enableParamLogging' => true,
),
.
.