[eluser]sayo[/eluser]
This section of the code in where makes
the query return no result:
'table1.invoice'=>'table2.invoice'
What am i doing wrong?
Code:
public function customer($offset, $limit = 20)
{
$this->db->select('table.name as username, table.useremail as email, table.OrderDate as date');
$this->db->from('table');
$this->db->join('table2', 'table2.uid = table.userid');
$this->db->where(array('table.confirm'=>1, 'table2.order'=>'buy', 'table1.invoice'=>'table2.invoice'));
$this->db->limit($limit,$offset);
$query = $this->db->get();
if($query->num_rows() == 0) return FALSE;
return $query->result();
}