What is the syntax for inserting data from one table to another table, using codeigniter active record syntax? I tried the usual mysqli query and it works, but I want to use CodeIgniter Active Record syntax for consistency.
I tried playing with these CodeIgniter Active Record queries but still no luck:
function insert_into()
{
$this->db->insert('table1');
$this->db->set('to_column');
$this->db->select('from_column');
$this->db->from('table2');
}