my model
function get_customer()
{
$this->db->select('*');
$this->db->from('tbl_customer');
$this->db->join('tbl_sales', 'tbl_sales.customer_id = tbl_customer.customer_id');
$query = $this->db->get();
return $query->result();
}
my controller
function index()
{
$this->load->model('sh_model');
$variable['customer'] = $this->sh_model->get_customer();
$this->load->view('sh_view', $variable);
}
my view
foreach($customer as $item)
{
echo $item->customer_id;
echo $item->customer_first_name;
}
I am getting no result.
__._,_.___
Visit phpXperts website at www.phpxperts.net
.
__,_._,___
No comments:
Post a Comment