I want to do exactly this but I want to do it in Cake PHP which makes things more complicated.
Here's what I have so far:
$results = $this->Model->find('first', array('conditions' => array('id' => $id),
'contain' => array('OtherModel' => array('limit' => 10)));
which limits the results of data from OtherModel
to 10. This isn't quite what I want though.. I want to limit the results to the last 10 results.
Any ideas how you would do this?
Many thanks :).