Hi everyone,
I know about the possibility of making a multiple insert in mySQL by doing something like this:
foreach ($array as $manuf) {
$sql[] = '("'.mysql_real_escape_string($manuf['name']).'", "'.$manuf['lang'].'", "'.$mId.'")';
}
$this->db->query('INSERT INTO manufacturers (name, lang ,mid) VALUES ' . implode(',', $sql) );
I wonder if there's a better way to do this and maybe extending the current DB (active-record) library to make it with even less code?
Thanks