search

Home  >  Q&A  >  body text

thinkphp database chain query sorting problem

$data = $this->db->table('travels')->where(array('status'=>0,'hot'=>1))->order( 'view','desc')->lists();


$data = $this->db->table('travels')-> ;where(array('status'=>0,'hot'=>1))->order('view','asc')->lists();


No matter what, it is sorted from small to large

What I want to do from large to small is a chain query

一個人去看海一個人去看海2084 days ago795

reply all(1)I'll reply

  • 一個人去看海

    一個人去看海2019-04-30 15:59:59

    Already know the answer, order('view asc')

    reply
    0
  • Cancelreply