日期:2014-05-16 浏览次数:20550 次
public function about()
{
require(CMS_PATH.'/data/config.php');
$id = trim($_REQUEST['id']);
$aboutclass = M('aboutclass');
$list_about=$aboutclass->where('id='.$id)->select();
$this->assign("aboutclass",$list_about);
dump($list_about);
$this->display();
}
这样怎么样?其实也可以自连接。 不知道lz这样要这样的目的
public function about()
{
require(CMS_PATH.'/data/config.php');
$id = trim($_REQUEST['id']);
$aboutclass = M('aboutclass');
$list_about['content']=$aboutclass->where('id='.$id)->select();
$list_about['category']=$aboutclass->select();
$this->assign("aboutclass",$list_about);
dump($list_about);
$this->display();
}