CakePHP requestAction 返回数据,find('all') 订单查询不起作用?
我不知道为什么我的 DESC 排序查询不起作用?根据手册和其他来源,它应该工作正常:
function pd_list() {
return $this->PlanDetail->find('all', array('order' => 'PlanDetail.name DESC', 'limit' => 10));
}
所有数据都按预期在我的元素中显示,但它不在 DESC 中(并且 10 限制也不起作用)顺序,并且我尝试了几次测试和“顺序” '=>好像没有什么效果?
I do not know why my DESC sort query is not working?? According to the manual and other sources, it should be working fine:
function pd_list() {
return $this->PlanDetail->find('all', array('order' => 'PlanDetail.name DESC', 'limit' => 10));
}
All data is being displayed as expected in my element, but its not in DESC (and the 10 limit is not working either) order and Ive tried several tests and the 'order' => seems to have no effect?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
乔布,
哇。在我失去了所有头发之后,我没有尝试这样做(现在排序正在工作!):) ..这是我完成的工作功能:
Joeb,
Wow. After all the hair I lost, I did not try that (and now the sort is working!) : ) .. Here is my completed working function: