From a51d232c863c101285d2b5f47482f6e856dd8ca9 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 16 Apr 2009 08:34:21 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DSQL=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 0e5ae082..5238d7ea 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -86,13 +86,13 @@ class Admin_DataController extends Zend_Controller_Action if ($view) { //查看此次申请的具体内容,包括指向的地址 } 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->messenger->addMessage('提示信息:该离线数据已经开始处理,请在处理完成后点击“完成”。'); $this->_redirect('/admin/data/offline'); } 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;"; try { $this->db->query($sql,array($finish,$finish)); @@ -106,7 +106,7 @@ class Admin_DataController extends Zend_Controller_Action } 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;"; //todo: 此处有问题,暂时跳过 }