[Solved] Cdbexception

I am getting this error,

3559

yii_error.png

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,

        ),

.

.



Does the table definitely exist? Can you post your database schema?

Yes this table does exists.

3560

db.png

The table isn’t shown in that image…

Ok,

Got it working. Problem was MySQL temp storage path was full so unable to retrive the table structure.