diff --git a/application/sync.php b/application/sync.php deleted file mode 100644 index fe84f941..00000000 --- a/application/sync.php +++ /dev/null @@ -1,37 +0,0 @@ -db); -Zend_Db_Table::setDefaultAdapter($db); - $sql="select item_id,title from knl_article"; - $rs=$db->fetchAll($sql); - foreach($rs as $r) - { - $sql="select item_id,place,keyword from knl_keyword where item_id=?"; - $rs1=$db->fetchAll($sql,array($r['item_id'])); - foreach($rs1 as $r1) - { - $sql="update knl_article set keywords[?]=? where item_id=?"; - $db->query($sql,array($r1['place'],$r1['keyword'],$r1['item_id'])); - } - $sql="select item_id,place,author from knl_author where item_id=?"; - $rs1=$db->fetchAll($sql,array($r['item_id'])); - foreach($rs1 as $r1) - { - $sql="update knl_article set authors[?]=? where item_id=?"; - $db->query($sql,array($r1['place'],$r1['author'],$r1['item_id'])); - } - print $r['title']."...\n"; - } -?> \ No newline at end of file