时间:2021-07-01 10:21:17 帮助过:7人阅读
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();
}