[eluser]cerberus478[/eluser]
Hi I'm doing a select statement using active records. When I print_r($data) to see if it is returning the values all i get is
Quote:Array ( [menus] => ) 1
I have 2 records in my table.
menus controller
Code:
function order_ajax(){
$data['menus'] = $this->menus_model->get_all();
echo print_r($data);
$data['view_file'] = "order_ajax";
$this->load->view('order_ajax', $data);
}
and my menus_model
Code:
function get_table() {
$table = "menus";
return $table;
}
function get_all(){
$table = $this->get_table();
$query = $this->db->get('$table');
return $query;
}