导入参考文献添加数据链接支持
This commit is contained in:
parent
744be6724b
commit
7e430e7e9e
|
@ -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) {}
|
||||
|
|
Loading…
Reference in New Issue