我正在尝试加入两个表customers
和loan
. 所以我的模型是:
if($type == 'society'):
$this->db->select('customers.customer_id,customers.customer_name,customers.customer_address,loan.loan_amount,loan.grant_date');
$this->db->from('customers');
$this->db->join('loan','loan.customer_id = customers.customer_id');
$this->db->where('loan.customer_type',$type);
$result = $this->db->get();
endif;
return $result;
和控制器:
$loan_customers_society = $this->loan_transaction_model->show_all_loan_customers($type = 'society');
var_dump($loan_customers_society);
但输出如下所示:
object(CI_DB_mysql_result)[19]
public 'conn_id' => resource(36, mysql link persistent)
public 'result_id' => resource(40, mysql result)
public 'result_array' =>
array
empty
public 'result_object' =>
array
empty
public 'custom_result_object' =>
array
empty
public 'current_row' => int 0
public 'num_rows' => int 3
public 'row_data' => null
这个输出是干什么用的?我将如何获得我想要的结果?