返回查询影响的记录数
$res = $this->db->get_where('wx_life',array('id'=>$id));
$num = $res->num_rows();
获取刚刚插入到数据库中的记录的id
$this->db->insert_id()
显示数据库操作所影响的行数
$this->db->affected_rows()
当执行写入操作(insert,update等)的查询后,显示被影响的行数。(对delete操作同样有效)
返回查询影响的记录数
$res = $this->db->get_where('wx_life',array('id'=>$id));
$num = $res->num_rows();
获取刚刚插入到数据库中的记录的id
$this->db->insert_id()
显示数据库操作所影响的行数
$this->db->affected_rows()
当执行写入操作(insert,update等)的查询后,显示被影响的行数。(对delete操作同样有效)