cBaddist
(C Baddist)
1
Can i redirect a Crud structure to another MSql database table?
i have a table in my Msql with the name contacts and a dublicate called a3_contacts.
is there a way to redirect to the dublicate with out going thru the whole Crud/Module generation process again?
Thanx in advance.
haimwd
(Haim)
2
if i undetstand you you want to redirect the ActiveRecord to another database, so you can in you model class add/change this function:
public function tableName()
{
return 'contacts';
}
to this one:
public function tableName()
{
return 'a3_contacts';
}
You could tell the underlying model, that is used by the crud, to use temporarily the second table.
tableName() method