if(empty($_REQUEST[‘cont‘]) or is_null($_REQUEST[‘cont‘])){ $sql = "select * from tb_article order by ".$fields." desc"; }else{ $querymem = $_REQUEST[‘querymem‘]; $signslt = $_REQUEST[‘signslt‘]; $cont = $_REQUEST[‘cont‘]; $sql = ‘select * from tb_article ‘; //firsttime if(in_array($querymem,array(‘id‘,‘hitnum‘,‘renum‘,‘examine‘))){ $sql .= " where ".$querymem." ".$signslt." ".$cont; //表示不懂 }else if(in_array($querymem,array(‘firsttime‘))){ if($signslt==‘=‘){ $sql.= "where ".$querymem." like ‘%".$cont."%‘"; }else{ $sql .= " where ".$querymem." ".$signslt." ‘".$cont."‘"; } }else if(in_array($querymem,array(‘typename‘,‘title‘,‘author‘))){ if($signslt == ‘exac‘){ $sql .= "where ".$querymem." = ‘".$cont."‘"; }else if($signslt == ‘mist‘){ $sql .= "where ".$querymem." like ‘%".$cont."%‘"; } }
----------------------------------------------------------