CakePHP Accessing Dynamically Created Tables?
Within the web application, users can upload data files that generate a new table in a separate MySQL database to store data. They can then manipulate this data in various ways.
The next version of this application is written in CakePHP and at the moment I can't figure out how to dynamically assign these tables at runtime.
I have a different database configuration and I can create tables when loading data as accurately as possible, but once that is done I cannot access the new table from the controller as part of the record's CRUD actions to manipulate the data.
I was hoping it would be down the line
function controllerAction(){
$this->uses[] = 'newTable';
$data = $this->newTable->find('all');
//use data
}
But it returns an error
Undefined property: ReportsController :: $ New_table
Fatal error: Calling member function find () on non-object in / app / controllers / reports _controller.php on line 60
Can anyone help.