|
@@ -548,7 +548,13 @@ class Lin_Model extends CI_Model
|
|
|
$this->db->where($this->primaryKey, $id);
|
|
|
$this->db->update($this->_table, $this->data);
|
|
|
$this->__affectedRows = $this->db->affected_rows();
|
|
|
- return $this->id;
|
|
|
+ //return $this->id;
|
|
|
+ //防止有些保存失败的情况
|
|
|
+ if(empty($this->__affectedRows)){
|
|
|
+ return 0;
|
|
|
+ }else{
|
|
|
+ return $this->id;
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|