Codeigniter JOIN var_dump() showing strange outputs
I am trying to JOIN two tables customers and loan. So my model is:
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;
And the controller :
$loan_customers_society =
$this->loan_transaction_model->show_all_loan_customers($type = 'society');
var_dump($loan_customers_society);
But the output is something like below:
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
What this output is for? And how will I get my desired result?
No comments:
Post a Comment