From fb905b5069ad6fac9561d71cdfdf40589b199cf9 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 12 Jun 2012 10:38:55 +0000 Subject: [PATCH] add zend_db fetchmode --- application/models/ISO19115.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/models/ISO19115.php b/application/models/ISO19115.php index 6c21987a..1901128c 100755 --- a/application/models/ISO19115.php +++ b/application/models/ISO19115.php @@ -184,7 +184,8 @@ class ISO19115 //do nothing. //说明数据库中已存在该信息 } - + $dbmode=$db->getFetchMode(); + $db->setFetchMode(Zend_Db::FETCH_OBJ); //save metadata into database try { $sql="insert into metadata (uuid,title,title_en,description,citation,suppinfo,fileformat,projection,datatype,filesize,ts_created, @@ -315,7 +316,8 @@ class ISO19115 } catch (Exception $e) { //数据重复插入,此处忽略所有错误 print $this->uuid.' has error: '.$e->getMessage().'
'; - } + } + $db->setFetchMode($dbmode); } function parse()