Hello once again.
Can I do this is Yii?
creating a model that do not have a predefined table name but can give the table when creating an instances of it
eg.
<?php
class myModelName extends CActiveRecord{
protected $_tableName=null;
public function __construct($table){
$this->_tableName = $table
}
public function tableName()
{
return $this->_tableName;
}
}
?>
calling my Model in a controller class
<?php
$table = ‘chemistry’;
$model = new myModelName($table);
?>
so that i can use only this Model to have access to a hundred tables that have the same db structure ?
thanks once again.