在CodeIgniter Active Record中,可以使用多个INSERT记录而无需使用for、foreach等循环语句吗?
我的当前代码:
foreach($tags as $tag) {
$tag = trim($tag);
$data = array(
'topic_id' => $topic_id,
'user_id' => $user_id,
'text' => $tag
);
$this->db->insert('topic_tags', $data);
}