can differentiate views and tables in dbo mysql scheme?
Yii::app()->db->schema->getTables()
returns tables and views
can differentiate views and tables in dbo mysql scheme?
Yii::app()->db->schema->getTables()
returns tables and views
Dear Friend
The only thing I am able to findout is that views have no PrimaryKey.
The following code brings all the names of views.
foreach(Yii::app()->db->schema->getTables() as $name=>$table)
{
if($table->primaryKey=="")
echo $table->name;
}
But I think this is not adequete enough to exactly differentiate between tables and views.
ok, works great! A good solution
++++ thx