Ticket #193 sql语句微调
This commit is contained in:
parent
93c1a2432a
commit
159cdccb61
|
@ -39,16 +39,9 @@ class Admin_SysController extends Zend_Controller_Action
|
||||||
$description = $this->_request->getParam('description');
|
$description = $this->_request->getParam('description');
|
||||||
$body = $this->_request->getParam('body');
|
$body = $this->_request->getParam('body');
|
||||||
|
|
||||||
$auth = Zend_Auth::getInstance();
|
|
||||||
if($auth->hasIdentity())
|
|
||||||
{
|
|
||||||
$user = $auth->getIdentity();
|
|
||||||
$userid = $user->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(empty($title)) $title=='未命名模板';
|
if(empty($title)) $title=='未命名模板';
|
||||||
|
|
||||||
$sql = "insert into emailtext (title,description,content,userid,ts_create) values ('$title','$description','$body','$userid','".time()."')";
|
$sql = "insert into emailtext (title,description,content,ts_create) values ('$title','$description','$body','".time()."')";
|
||||||
|
|
||||||
try{
|
try{
|
||||||
if($this->db->exec($sql)>0)
|
if($this->db->exec($sql)>0)
|
||||||
|
|
Loading…
Reference in New Issue