1,返回最新插入数据的id
$this->db->insert('user', $data); return $this->db->insert_id();
2,返回数组结果
$query = $this->db->get_where('users', array('user_id'=> $id)); return $query->row_array();
3,返回对象结果
$query = $this->db->get_where('users', array('user_id'=> $id)); return $query->row();
Leave a Reply