$where=" and (`name` like '%".$searchValue."%') ";
$where.=" and (t.`name` like '%".$searchValue."%') ";
}
$model=newModel();
...
...
@@ -25,9 +28,11 @@ class PlayCtrlModel extends RelationModel{
//返回列表(limit分页)
if($queryType=="list"){
$where.=$sort." ".$limit;
$fields=" *,case `status` when 0 then '<font color=red>删除</font>' when 1 then '<font color=green>上线</font>' when 2 then '<font color=red>下线</font>' end as `status` ";
$fields=" t.*,s.name sp_name,case t.`status` when 0 then '<font color=red>删除</font>'
when 1 then '<font color=green>上线</font>'
when 2 then '<font color=red>下线</font>' end as `status` ";
}
$sql="select ".$fields." from sh_task_ctrl where 1=1 ".$where.";";
$sql="select ".$fields." from sh_task_ctrl t,sh_sp s where 1=1 and t.sp_id=s.id ".$where.";";