I have Codeigniter setup to add the prefix kms_ to my active record queries. However, I am trying to do a join with two ON conditions and it doesn\'t prepend them.
R
You can get the current database prefix manually like this:
$prefixed_tablename = $this->db->dbprefix('tablename');
So you could do this:
$this->db->join('site_items', $this->db->dbprefix('site_items') . '.item_id = ' . $this->db->dbprefix('items') . '.id AND ' . $this->db->dbprefix('site_items') . '.site_id = 1', 'left');
Docs Here