在codeigniter中交叉加入?

I'm trying this

$this->db->join('tableTwo as b','','CROSS');
$result = $this->db->get('tableOne as a')->result(); 

Some solution?

Solution for cross join in codeigniter:

$this->db->join('tableTwo as b','true');
$result = $this->db->get('tableOne as a')->result(); 

You should use it this way:

$this->db->join('tableTwo as b','true');
$result = $this->db->get('tableOne as a')->result(); 

In codeigniter 3, You can add cross join query builder by

$this->db->join('tableTwo as b','1=1');                    //true relation
$result = $this->db->get('tableOne as a')->result(); 

Or by passing an array in from method or get methods

$result = $this->db->get(['tableOne as a','tableTwo as b'])->result(); 

or

$result = $this->db->from(['tableOne as a','tableTwo as b'])
get()->result();     //by this method you can add as many table you want to join

or by passing one table in from and other in get method

$result = $this->db->from('tableOne as a')
get('tableTwo as b')->result();