I have two tables having one column common as they are connected with each other. I want to update the data in both tables at once
function profile_update($pre,$data)
{
$this->db->select('*');
$this->db->from('users');
$this->db->where(array('users.pre' => "$pre"));
$this->db->join('user_data', 'user_data.pre = users.pre');
$this->db->set($data);
$this->db->update('users');
}
*Error Number: 1054
Unknown column 'address' in 'field list'
This is the error I am getting as it is updating only one table seems like Join is not working.*