$this->db->order_by("id", "desc");到底怎么用???
$this->db->order_by("id", "desc");到底怎么用啊
在模型里写了这句
$query = $this->db->get_where('yule_wenzhang', "tags like '%$b%' or title like '%$b%'");
我就想和这句连上倒序排列?放在各种位置都试了还是ID 1 2 3这么排
$query = $this->db->get_where('yule_wenzhang', "tags like '%$b%' or title like '%$b%'");$this->db->order_by("id", "asc");
这么写没作用啊 建议将每一个条件都分开写。
$this->db->where();
$this->db->order_by("id", "desc");
$query = $this->db->get(); 本帖最后由 wuqian9871 于 2013-10-1 18:46 编辑
谢谢了 成功:) 本帖最后由 寄语残云 于 2017-7-19 16:10 编辑
$query = $this->db->like( 'tags',$b, 'both')->or_like('title', $b, 'both') ->order_by("id", "asc")->get('yule_wenzhang')->result_array();
页:
[1]