davykiash
davykiash

Reputation: 1804

Generating models from database views in Yii

Am trying to generate models from database views 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?

Upvotes: 0

Views: 3100

Answers (2)

Wasim Pathan
Wasim Pathan

Reputation: 420

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.

Upvotes: 0

k to the z
k to the z

Reputation: 3185

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.

Upvotes: 3

Related Questions