不是很明白
拼凑SQL语句吧?$sql = "select * from tb where 1 ";
if($act == "yes")
{
$sql.=" and 字段1=1";
}
else
{
$sql.=" and 字段1=0";
}
$sql.=" order by id desc";