导入参考文献添加数据链接支持

This commit is contained in:
wlx 2011-12-20 09:20:20 +00:00
parent 744be6724b
commit 7e430e7e9e
1 changed files with 7 additions and 2 deletions

View File

@ -685,7 +685,12 @@ class Admin_DataController extends Zend_Controller_Action
foreach($lines as $line)
{
$data=explode(";",$line);
$sql="insert into reference (reference) values(?)";
if (count($data)==2)
$link='';
else
$link=$data[2];
$link=$this->db->quote($link);
$sql="insert into reference (reference,link) values(?,".$link.")";
try {
$this->db->exec($this->db->quoteInto($sql,$data[1]));
} catch (Exception $e) {}