影響PHP+MYSQL執(zhí)行速度的寫法對(duì)比第1/7頁
[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
相關(guān)文章
PHP程序員面試 切忌急功近利(更需要注重以后的發(fā)展)
招聘一個(gè)程序員,唯一對(duì)你有意義的是他能寫出好程序的能力。 很少人像這樣去招人,他們更喜歡去挑剔程序員的個(gè)人癖好和性格缺點(diǎn)。2010-09-09

