From 4dd37341edddeb9e7602e1dbdebba5c777f86206 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 18 Sep 2014 11:01:23 +0000 Subject: [PATCH] fix sql error, change the chinese blank --- application/default/controllers/AuthorController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index 1e38a17c..fef1a397 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -2346,7 +2346,7 @@ class AuthorController extends Zend_Controller_Action $row=$sth->fetch(); if (!empty($row)) { - $data = array("error"=>'错误的入口'); + $data = array("error"=>'Wrong path.'); $this->jsonexit($data); return true; } @@ -2373,7 +2373,7 @@ class AuthorController extends Zend_Controller_Action // 保存数据作者信息 // 仅保存不存在的作者信息 - $sql="insert into mdauthor (uuid,userid,ts_activated,status) select ?,?,now(),1 where not exists + $sql="insert into mdauthor (uuid,userid,ts_activated,status) select ?,?,now(),1 where not exists (select id from mdauthor where uuid=? and userid=?)"; $this->db->query($sql,array($row['uuid'],$u_id),$row['uuid'],$u_id);