转:https://blog.csdn.net/fgdfgasd/article/details/46531743
save:
$result=$item->where()->save();
if ($result === FALSE) {
echo '修改失败';
} elseif($result === 0) {
echo '未更改';
} else {
echo '已更改';
}
add:
if($item->data($data1)->add()!=false)
$this->success("您的信息提交成功,请耐心等候审核!",U('Index/index'));
else
$this->error("您的信息提交失败!");