操作成功才计数

This commit is contained in:
wlx 2011-09-15 10:09:40 +00:00
parent 593787fa2c
commit d41e029f99
1 changed files with 1 additions and 2 deletions

View File

@ -239,8 +239,7 @@ class Admin_DownController extends Zend_Controller_Action
if (empty($v['userid'])) if (empty($v['userid']))
{ {
$sql="update offlineapp set userid='{$v['uid']}' where id='{$v['oid']}'"; $sql="update offlineapp set userid='{$v['uid']}' where id='{$v['oid']}'";
$re=$this->db->exec($sql); if ($this->db->exec($sql)) $s++;
$s++;
} }
} }
$this->messenger->addMessage('提示信息:已有 '.$s.' 条记录被更改'); $this->messenger->addMessage('提示信息:已有 '.$s.' 条记录被更改');