PHP:
if($_GET[tp]=="审前社区调查"){
return  "select z_dangan.*,z_sqsqdc.xingming xingming,z_sqsqdc.sfzh sfzh from z_dangan,z_sqsqdc where z_dangan.pid=z_sqsqdc.id and  tp='$_GET[tp]'  {where_str} ";
}else{
return "select z_dangan.*,z_base.xingming xingming,z_base.sfzh sfzh from z_dangan,z_base where z_dangan.pid=z_base.id and  tp='$_GET[tp]'  {where_str} ";
}