I'm making many database connections using the tutorial. The code is working fine in the model but the problem is that I am using an extension where I have the Yi :: app () - gt; & Gt; Db; Here I am getting the exception property "CWebApplication.dbadvert" is not defined. The extension of the extension has been enhanced by the CExtController. Please help. In the example you are setting dbadvert for custom code records class RActiveRecord , not for web application. If you would like it to be Yii :: app () -> gt; Dbadvert , you will need to set it up in your config.php section 'dbadvert' = & gt; Array ('class' = & gt; 'CDbConnection' * parameter * *), UPD A wrapper component for you You can create CDbConnection, which you want in any way to change the connection string and put it as a webapp component. & lt ;? Php class CMultiuserDatabaseConnection CaptureComment {public function __call ($ name, $ p...
Comments
Post a Comment