强制数组模式

This commit is contained in:
wlx 2011-10-27 10:01:18 +00:00
parent fd98b05f59
commit a48a75a77c
1 changed files with 4 additions and 3 deletions

View File

@ -18,10 +18,11 @@ class EmailText{
if(is_numeric($this->tmpid))
$sql = "select * from emailtext where id='".$this->tmpid."'";
else
$sql = "select * from emailtext where template='".$this->tmpid."'";
$sql = "select * from emailtext where template='".$this->tmpid."'";
$t=$this->db->getFetchMode();
$this->db->setFetchMode(Zend_Db::FETCH_ASSOC);
$rs = $this->db->query($sql);
$this->db->setFetchMode($t);
$this->tmpinfo = $rs->fetch();
}