首页  >  文章  >  后端开发  >  影响PHP+MYSQL执行速度的写法对比第1/7页_PHP教程

影响PHP+MYSQL执行速度的写法对比第1/7页_PHP教程

WBOY
WBOY原创
2016-07-21 15:58:02776浏览

[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

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/317672.htmlTechArticle[code]?php include_once("../db.php"); if($_GET[x2]==0and$_GET[x1]==0) { $t="s1=''"; }else { if($_GET[x2]!=0) { $t="x2='$_GET[x2]'"; }else if($_GET[x1]!=0) { $t="x1='$_GET[x1]'andx2...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn