|
控制器是我这么写的
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class User extends CI_Controller {
function select()
{
$this->load->model('test_m');
echo $data['users'] = $this->test_m->urer_select(2);//这里有错误码?为什么显示结果是Array?
}
}
?>
models 我是这样的写的
<?php
function urer_select($id){
$this->db->where("id",$id);
$this->db->select('*');
$query = $this->db->get('users');
return $query->result_array();
}
?>
|
|