i have model "Report" with table "reports"
it contain report of last month. (50 000 records every month)
how can implement archive the data in another table with the same structure and logic.
and manipulate reading in Model.
in my controller i want to ("DRY"):
function index() {
$reports = $this->Report->find('all');
$this->set('report', $reports);
}
function archive()
//do some manipulation
//$this->Report->table = "reportarchives"
$reports = $this->Report->find('all');
//but query from "archived" table
$this->set('report', $reports);
$this->render('index')
}
please give some suggestions
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment