0
我想完全做this,但我想在CakePHP中這樣做,這使得事情更加複雜。獲取MySQL查詢的最後n個結果,但在CakePHP中
這是我到目前爲止有:
$results = $this->Model->find('first', array('conditions' => array('id' => $id),
'contain' => array('OtherModel' => array('limit' => 10)));
這限制了數據的結果,從OtherModel
爲10。這是不太我想要什麼儘管..我想限制結果到最後10結果。
任何想法你會怎麼做?
非常感謝:)。