当我尝试运行跟随查询时,它永远不会返回任何内容,它只是继续运行。我做错了什么?
$this->db->distinct('customer.Name')
->from('customer')
->from('invoicelinedetail')
->from('invoice')
->from('iteminventory')
->where('invoice.CustomerRef_ListID = customer.ListID')
->where('invoicelinedetail.IDKEY = invoice.TxnID')
->where('invoicelinedetail.ItemRef_ListID =', $id)
->order_by('customer.Name', 'desc');
$query = $this->db->get();
答案 0 :(得分:0)
$this->db->get();
后,您需要检索结果
为此,请将$query=
设置为以下之一:
$this->db->result_array(); //returns array
$this->db->row_array(); //returns single row as array
$this->db->result(); //returns object
$this->db->row(); //returns single row as object