为什么order_by
中的codeigniter
无效?
$this->db->order_by("id", "desc")->query('SELECT @rownum:=@rownum+1 rownum, t.* FROM (SELECT @rownum:=0) r, hotel_submits t');
答案 0 :(得分:0)
尝试
$query= $this->db->query('SELECT @rownum:=@rownum+1 rownum, t.* FROM (SELECT @rownum:=0) r, hotel_submits t order by id desc');