页面导航: 首页网络编程PHP编程php文摘 → 正文内容

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

发布:dxy 字体:[增加 减小] 类型:转载

[code]<?php 
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

当前1/7页 1234567下一页
浏览次数:载入中... 打印本文关闭本文返回首页

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行