문제

The main configuration of the file ( main.php ) is as follows:

'class'=>'CDbConnection',
'connectionString'=>'mssql:host=127.0.0.1;dbname=TestSQL'

I can connect to the database successfully, but when generating a model from Yii Code Generator it tells me that the table does not exist.

도움이 되었습니까?

해결책

Table exists? Gii generates a model based on table. First you need to create a table. If you use console version gii, then to need manage console.php config.

다른 팁

Found Solution renamed the table name to different name and regenerated the model using gii, the things started working again!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top