开发者

Generating models from database views in Yii

Am trying to generate models from database v开发者_如何学运维iews with the sole purpose of viewing and searching complex records from various tables.

However I get "Table 'XXX' does not exist".Logically views are like tables.

Any creative workarounds?


I created a AR model of a view using gii a few days ago. I just had to put in the view name and it worked. You must be typing the view name wrong.

Here is the SO question I asked about it a while ago.


That is a system-specific database access violation, and does not relate to the Yii code at least, have your webhost equip your MySQL username with SHOW VIEW privileges for the database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜