douwen0612 2011-08-19 16:04
浏览 73
已采纳

Doctrine_Core :: getTable() - > findAll()如何指定顺序?

When using a Doctrine_Table object, is it possible to specify the order of the returned collection when using findAll() or findByWhatever()?

In the doc's I see some stuff about getOrderByStatement() and processOrderBy() but it isn't clear on how to use them...

  • 写回答

4条回答 默认 最新

  • duanlachu7344 2013-03-25 09:28
    关注

    You can also leave the first array blank

      $em->getRepository('BackendDestinyBundle:Destiny')->findBy(array(), array('title'=>'asc'));
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?