|
本帖最后由 wunayou 于 2012-2-17 21:45 编辑
模型
function get_product($id)
{
$query=$this->db->query("select * from product where brand=(select name from product_brand where id=$id)");
return $query->result();
}
控制
function index() { $data['category']=$this->Mhome->get_category(); $data['brand']=$this->Mbrand->get_product($this->uri->segment(2)); / 这里是不是 不能这样写啊 URL http://localhost/3/index.php/brand/18 是不是得不到这个18 这个下面是不是要方法呢?
$this->load->view('header',$data);
$this->load->view('brand');
$this->load->view('footer'); }
这里那里有错吗? 为什么 这样做 会显示页面不存在?
|
|