调整了xml表的保存次序

This commit is contained in:
wlx 2012-12-13 06:42:42 +00:00
parent 8b6c510ad4
commit 9bcfc83d5a
1 changed files with 3 additions and 3 deletions

View File

@ -252,9 +252,6 @@ class ISO19115
$sql="insert into dataseries (id,sid) values(?,?)"; $sql="insert into dataseries (id,sid) values(?,?)";
$db->query($sql,array($id,$sid)); $db->query($sql,array($id,$sid));
} }
//处理XML入库
$sql="insert into xml (id,data) values(?,?)";
$db->query($sql,array($id,$xml));
//处理数据分类 //处理数据分类
foreach($this->tpCat as $cat){ foreach($this->tpCat as $cat){
if (is_numeric($cat)) { if (is_numeric($cat)) {
@ -318,6 +315,9 @@ class ISO19115
} }
} }
$this->save("../data/import/$this->uuid.xml"); $this->save("../data/import/$this->uuid.xml");
//处理XML入库
$sql="insert into xml (id,data) values(?,?)";
$db->query($sql,array($id,$xml));
} catch (Exception $e) { } catch (Exception $e) {
//数据重复插入,此处忽略所有错误 //数据重复插入,此处忽略所有错误
print $this->uuid.' has error: '.$e->getMessage().'<br />'; print $this->uuid.' has error: '.$e->getMessage().'<br />';