修复SQL错误。

This commit is contained in:
wlx 2009-04-16 08:34:21 +00:00
parent 6d33ec5d1f
commit a51d232c86
1 changed files with 3 additions and 3 deletions

View File

@ -86,13 +86,13 @@ class Admin_DataController extends Zend_Controller_Action
if ($view) { if ($view) {
//查看此次申请的具体内容,包括指向的地址 //查看此次申请的具体内容,包括指向的地址
} elseif ($start) { } elseif ($start) {
$sql="update dataorder d set d.status=4 where d.status=3 and d.userid=?"; $sql="update dataorder set status=4 where status=3 and userid=?";
$this->db->query($sql,array($start)); $this->db->query($sql,array($start));
//提示信息 //提示信息
$this->messenger->addMessage('提示信息:该离线数据已经开始处理,请在处理完成后点击“完成”。'); $this->messenger->addMessage('提示信息:该离线数据已经开始处理,请在处理完成后点击“完成”。');
$this->_redirect('/admin/data/offline'); $this->_redirect('/admin/data/offline');
} elseif ($finish) { } elseif ($finish) {
$sql="begin;update dataorder d set d.status=5,d.ts_approved=now() where d.status=4 and d.userid=?;"; $sql="begin;update dataorder set status=5,ts_approved=now() where status=4 and userid=?;";
$sql.="update offlineapp set ts_approved=now() where userid=? and ts_approved is null;commit;"; $sql.="update offlineapp set ts_approved=now() where userid=? and ts_approved is null;commit;";
try { try {
$this->db->query($sql,array($finish,$finish)); $this->db->query($sql,array($finish,$finish));
@ -106,7 +106,7 @@ class Admin_DataController extends Zend_Controller_Action
} elseif ($cancel) { } elseif ($cancel) {
//取消=删除? //取消=删除?
//需谨慎操作 //需谨慎操作
$sql="begin;update dataorder d set d.status=-1 where (d.status=3 or d.status=4) and d.userid=?;"; $sql="begin;update dataorder set status=-1 where (status=3 or status=4) and userid=?;";
$sql.="delete from offlineapp where id=?;commit;"; $sql.="delete from offlineapp where id=?;commit;";
//todo: 此处有问题,暂时跳过 //todo: 此处有问题,暂时跳过
} }