Is it possible to do an active record query in CodeIgniter that will update an existing record if one already exists or insert if it doesnt, for the given k
You could do it simpler:
$sql = $this->db->insert_string(table, $array) . ' ON DUPLICATE KEY UPDATE ' . implode(', ', $array); $this->db->query($sql);