代码求简化
<br /> <form class="f"action="wel.php" method="get"><br /> <input class="inp" type="text" name="mindate" value="<?php echo $mindate ?>" onfocus="HS_setDate(this)" readonly="readonly"/>至<br /> <input class="inp" type="text" name="maxdate" value="<?php echo $maxdate ?>" onfocus="HS_setDate(this)" readonly="readonly"/><br /> <input class="sub" type="submit" value="统计"/><br /> </form><br />
<br /><?php<br />$sql="SELECT count(*) AS count FROM `khxx` WHERE dates>='".$mindate."' and dates<='".$maxdate."' and `type`='新增' and `area`='城南东'";<br />$cndx=mysql_result(mysql_query($sql),0);<br />$sql="SELECT count(*) AS count FROM `khxx` WHERE dates>='".$mindate."' and dates<='".$maxdate."' and `type`='续费' and `area`='城南东'";<br />$cndf=mysql_result(mysql_query($sql),0);<br />$sql="SELECT count(*) AS count FROM `khxx` WHERE dates>='".$mindate."' and dates<='".$maxdate."' and `type`='升兆' and `area`='城南东'";<br />$cnds=mysql_result(mysql_query($sql),0);<br />$sql="SELECT count(*) AS count FROM `khxx` WHERE dates>='".$mindate."' and dates<='".$maxdate."' and `type`='免费' and `area`='城南东'";<br />$cndm=mysql_result(mysql_query($sql),0);<br /><br />$sql="SELECT count(*) AS count FROM `khxx` WHERE dates>='".$mindate."' and dates<='".$maxdate."' and `type`='新增' and `area`='城南西'";<br />$cnxx=mysql_result(mysql_query($sql),0);<br />$sql="SELECT count(*) AS count FROM `khxx` WHERE dates>='".$mindate."' and dates<='".$maxdate."' and `type`='续费' and `area`='城南西'";<br />$cnxf=mysql_result(mysql_query($sql),0);<br />$sql="SELECT count(*) AS count FROM `khxx` WHERE dates>='".$mindate."' and dates<='".$maxdate."' and `type`='升兆' and `area`='城南西'";<br />$cnxs=mysql_result(mysql_query($sql),0);<br />$sql="SELECT count(*) AS count FROM `khxx` WHERE dates>='".$mindate."' and dates<='".$maxdate."' and `type`='免费' and `area`='城南西'";<br />$cnxm=mysql_result(mysql_query($sql),0);<br />
<br /> <tr><br /> <td>城南东</td><br /> <td><?php echo $cndx;?></td><br /> <td><?php echo $cndf;?></td><br /> <td><?php echo $cnds;?></td><br /> <td><?php echo $cndm;?></td><br /> </tr><br /> <tr><br /> <td>城南西</td><br /> <td><?php echo $cnxx;?></td><br /> <td><?php echo $cnxf;?></td><br /> <td><?php echo $cnxs;?></td><br /> <td><?php echo $cnxm;?></td><br /> </tr><br />