可以在CodeIgniter Active Record中使用多个INSERT记录而不使用forach,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);
}
Run Code Online (Sandbox Code Playgroud)