Welcome Guest, Not a member yet? Register   Sign In
Update two joined tables
#1

[eluser]insub2[/eluser]
I'm having a hard time finding out how to do this.

I can get from the DB with the join and it works as expected.
But I can't update using $this->db->update($table, $insert).

This works for getting:
Code:
function get_profile()
    {

        $this->db->get($this->_prefix.'user');
        $this->db->join($this->_prefix.'user', $this->_prefix.'user.id = '.$this->_prefix.'user_profile.id');
        
        //SELECT name FROM user WHERE id = $id

        $this->db->where('user_name', 'insub2'); //I Know, I just haven't gotten to the point where this is done dynamically

        
        $query = $this->db->get($this->_table);
        
        $row = $query->row();
        
        return $row;
    }

I can't seem to find anyway to update a join or two tables in one query. Is it possible? It seems like it should be.


Messages In This Thread
Update two joined tables - by El Forum - 11-13-2008, 02:58 PM
Update two joined tables - by El Forum - 11-13-2008, 03:14 PM
Update two joined tables - by El Forum - 11-13-2008, 03:26 PM
Update two joined tables - by El Forum - 07-14-2009, 10:45 PM
Update two joined tables - by El Forum - 07-15-2009, 12:00 AM
Update two joined tables - by El Forum - 07-15-2009, 12:24 AM
Update two joined tables - by El Forum - 07-15-2009, 12:43 AM
Update two joined tables - by El Forum - 07-15-2009, 12:52 AM
Update two joined tables - by El Forum - 08-13-2009, 12:33 PM
Update two joined tables - by El Forum - 08-13-2009, 12:40 PM
Update two joined tables - by El Forum - 08-13-2009, 12:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB