模糊查詢:sql
$this ->db->like( 'title' , 'match' , 'before' ); |
// 生成: WHERE title LIKE '%match' |
// 生成: WHERE title LIKE 'match%' |
$this ->db->like( 'title' , 'match' , 'after' ); |
// 生成: WHERE title LIKE '%match%' |
$this ->db->like( 'title' , 'match' , 'both' ); |
排序:this
$this->db->order_by('sort', 'desc');
返回sql語句: echo $this->db->last_query();code
返回插入id:$this->db->insert_id(); 排序