Php
function Xuesheng () {
$c =m (' case ')->field (' id ')->where ("Upid=5 and State=1")->findall ();
foreach ($c as $k = = $v) {
$caseid []= $v [' id '];
}
$wherecase = "and Cid in (". Implode (', ', $caseid). ")";
$qu =m (' News ')->field (' Pic1 ')->where (' state=1 '. $wherecase)->group (' Pic1 ')->order (' order
ASC, id DESC ') ->findall ();
$this->assign (' qu ', $qu);
if ($_post) {
$list =m (' News ')->where ("State=1 and pic1= ' $_post[pic1] ' and pic= ' $_post[pic] ' and title= ' $_post[title] '". $ wherecase)->order (' order
ASC, id desc ')->findall ();
if ($list) {
foreach ($list as $k = & $v) {
$case =m (' case ')->field (' name ')->where ("id= $v [CID]")->find ();
$v [' Case_name ']= $case [' name '];
}
}
$this->assign (' list ', $list);
}
$this->display (' Xuesheng ');
}
How to add a sentence, if you do not find the relevant information, I am sorry, you have not been admitted.