function recoverTopicTags() { $mark = new mark(); $result = $dataSeach = array(); $dataSeach = array('source' => 'topic', 'count' => -1); // $result = $mark->get_id_by_name($dataSeach); if ($result) { $topic_arr = array(); foreach ($result as $k => $v) { $topic_arr[$v['source_id']][] = $v['mark_name']; } if ($topic_arr) { echo "topic标签更新开始<br/>"; foreach ($topic_arr as $k => $v) { $data = array(); if ($v) { $data['tags'] = implode(',', $v); } if ($data) { $this->libactivity->update('topic', $data, array('topic_id' => $k), array()); echo "...topic" . $k . "标签更新完毕<br/>"; } } echo "topic标签更新完毕<br/>"; } } }