在处理联系人时,保证email地址不会漏掉

This commit is contained in:
wlx 2010-07-01 04:31:30 +00:00
parent 8d8a11cfbb
commit 25a017ca6e
1 changed files with 7 additions and 0 deletions

View File

@ -830,6 +830,13 @@ class Admin_DataController extends Zend_Controller_Action
{
$sql="insert into responsible (individual,organisation,position,delivery,phone,email,city,country,administrative,postal) values(?,?,?,?,?,?,?,?,?,?)";
$this->db->query($sql,array($ind,$au['organisation'],$au['position'],$au['delivery'],$au['phone'],$au['email'],$au['city'],$au['country'],$au['administrative'],$au['postal']));
} else {
//deal email address
if (($au['email']) && empty($row->email))
{
$sql="update responsible set email=? where id=?";
$this->db->query($sql,array($au['email'],$row->id));
}
}
$sql="select id from responsible where individual=? and organisation=?";
$row=$this->db->fetchRow($sql,array($ind,$au['organisation']));