同步单条数据时也更新source信息

This commit is contained in:
wlx 2011-10-20 06:57:30 +00:00
parent 8e7c1b5048
commit 396c5c5d06
1 changed files with 3 additions and 2 deletions

View File

@ -93,9 +93,10 @@ class Admin_DataController extends Zend_Controller_Action
} else $this->view->msg='不存在此元数据:'.$uuid;
} elseif (!empty($uuid) && isset($_POST['watersubmit'])) {
//同步单条元数据
$sql=$this->db->quoteInto("select data from watergn where uuid=?",$uuid);
$sql=$this->db->quoteInto("select data,source from heihegn where uuid=?",$uuid);
if ($rs=$this->db->fetchRow($sql)) {
$this->import($rs->data);
$this->import($rs->data);
$this->db->query("update metadata set source=? where uuid=?",array($rs->source,$uuid));
$this->view->msg='成功同步元数据:'.$uuid;
} else $this->view->msg='不存在此元数据:'.$uuid;
} elseif (!empty($uuid)) {