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()