影响PHP+MYSQL执行速度的写法对比第1/7页_PHP教程
程序员文章站
2022-06-01 10:09:28
...
[code]include_once("../db.php");
if($_GET[x2]==0 and $_GET[x1]==0)
{
$t=" s1='' ";
}else
{
if($_GET[x2]!=0)
{
$t=" x2='$_GET[x2]' ";
}else
if($_GET[x1]!=0)
{
$t=" x1='$_GET[x1]' and x2=0 ";
}
}
$query = "select count(*) from ask_member where $t ";
$result2 = mysql_db_query($DataBase, $query);
$r3 = mysql_fetch_array($result2);
$amount=$r3[0];
$page_size=5;
if($amount%$page_size==0 and $amount>0)
{
$pagecount=($amount/$page_size);
}else
{
$pagecount=intval($amount/$page_size)+1;
}
if($_GET
if($_GET[x2]==0 and $_GET[x1]==0)
{
$t=" s1='' ";
}else
{
if($_GET[x2]!=0)
{
$t=" x2='$_GET[x2]' ";
}else
if($_GET[x1]!=0)
{
$t=" x1='$_GET[x1]' and x2=0 ";
}
}
$query = "select count(*) from ask_member where $t ";
$result2 = mysql_db_query($DataBase, $query);
$r3 = mysql_fetch_array($result2);
$amount=$r3[0];
$page_size=5;
if($amount%$page_size==0 and $amount>0)
{
$pagecount=($amount/$page_size);
}else
{
$pagecount=intval($amount/$page_size)+1;
}
if($_GET
上一篇: 配置了zendframework,其他项目进不去了,该如何处理
下一篇: Oracle的客户端工具