Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHPʵÀý£ºÓÃPHP¼òµ¥ÊµÏÖ¶àÌõ¼þ²éѯ

ÔÚÎÒÃǵÄÍøÕ¾Éè¼Æ¹ý³ÌÖУ¬¾­³£»áÓõ½¶àÌõ¼þ²éѯ£¬±¾ÎĵÄÔ´ÂëÊÇÒ»¸ö¶þÊÖ·¿ÎݲéѯµÄÀý×Ó¡£ÔÚ±¾ÀýÖУ¬ÎÒÃÇҪʵÏÖÄܹ»Í¨¹ýµØÀíλÖã¬ÎïÒµÀàÐÍ£¬·¿Îݼ۸ñ£¬·¿ÎÝÃæ»ý¼°ÐÅÏ¢·¢²¼ÈÕÆڵȶà¸öÌõ¼þ²éѯµ½¿Í»§ËùÐèµÄ×ÊÁÏ¡£
²éѯÎļþ£¨search.php£©
Ò»¡¢Éú³É²éѯÓï¾ä£º
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
<?
$conn=mysql_connect("localhost","root","");
$db=mysql_select_db("lingyun");
$query="select * from message where tradetype='".$tradetype."'"; //½»Ò×ÀàÐÍ£¬Èç³ö×⣬³öÊÛ
$SQL=$SQL . "wuye='" . $wuye . "'";
if($housetype!="²»ÏÞ"){
$query.=" && housetype='".$housetype."'"; //·¿ÎÝÀàÐÍ£¬Èç¶þÊÒÒ»Ìü£¬ÈýÊÒ¶þÌü
}
if($degree!="²»ÏÞ"){
$query.=" && degree='".$degree."'"; //оɳ̶È
}
if($wuye!="²»ÏÞ"){
$query.=" && wuye='".$wuye."'"; //ÎïÒµÀàÐÍ Èçס·¿£¬ÉÌÆÌ
}
if($price2!=""){
switch($price1){
case "´óÓÚ":
$query.=" && price>'".$price2."'"; //¼Û¸ñ
break;
case "µÈÓÚ":
$query.=" && price='".$price2."'";
break;
case "СÓÚ":
$query.=" && price<'".$price2."'";
break;
}
}
if($area2!=""){
switch($area1){
case "´óÓÚ":
$query.=" && area>'".$area2."'"; //Ãæ»ý
break;
case "µÈÓÚ":
$query.=" && area='".$area2."'";
break;
case "СÓÚ":
$query.=" && area<'".$area2."'";
break;
}
}
switch($pubdate){ //·¢²¼ÈÕÆÚ
case "±¾ÐÇÆÚÄÚ":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=7";
break;
case "Ò»¸öÔÂÄÚ":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=30";
break;
case "Èý¸öÔÂÄÚ":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=91";
break;
case "Áù¸öÔÂÄÚ":
$query.=" && TO_DAYS(NOW()) - TO_DAYS(date)<=183";
break;
}
if($address!=""){
$query.=" && address like '%$address%'"; //µØÖ·
}
if(!$page){
$page=1;
}
?>
¶þ¡¢Êä³ö²éѯ½á¹û£º
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
<?php
if ($page){
$page_size=20;
$result=mysql_query($query);
#$message_count=mysql_result($result,0,"total");
$message_count=10;
$page_


Ïà¹ØÎĵµ£º

ºÜºÃÓõÄphpÖ´ÐÐʱ¼ä·ÖÎö¹¤¾ßwebgrind

ÒÔÇ°·ÖÎöxdebugÓõÄÊÇ£¨wincachegrind£©http://sourceforge.net/projects/wincachegrind/
ÏÖÔÚÖ±½Ó°²×°webgrindÀ´µ÷ÊÔËٶȻá¸üºÃ
http://xdebug.org/
ÏÂÔصØÖ·£º
Source:
xdebug 2.0.3
Windows modules:
PHP 5.1.2-5.1.7
PHP 5.2.1-5.2.6
PHP 5.3.0dev
windows
±à¼­php.ini£¬ÏÈ×¢Ê͵ôzend£º
[Zend]
;zend ......

¡¾PHPϵÁн̡̳¿(1)——µÚÒ»¸öPHPÒ³Ãæ

¡¾PHPϵÁн̡̳¿ÊǸù¾ÝÏÖÓС¶PHP Manual¡·½øÐÐÊÕ¼¯ºÍÕûÀíËùµÃ£¬ËùÓдúÂ붼ÒѾ­²âÊÔͨ¹ý¡£ÔÚתÔعý³ÌÖУ¬Çë×¢Ã÷³ö´¦¡£
Ò»¡¢Ô¤±¸ÖªÊ¶£ºPHP»·¾³µÄ´î½¨
»·¾³µÄ´î½¨ÔÚÇ°ÃæÒѾ­¸ø³öÁËÏêϸµÄ˵Ã÷£¬ÍøַΪ£ºhttp://blog.csdn.net/rocket5725/archive/2009/12/28/5090489.aspx¡£
¶þ¡¢µÚÒ»¸öPHPÒ³Ãæ
ÔÚWEB·þÎñÆ÷¸ùĿ¼ÏÂD:\Progra ......

ÓÃPHPµÄob_start();¿ØÖÆÄúµÄä¯ÀÀÆ÷cache!


Output Control º¯Êý¿ÉÒÔÈÃÄã×ÔÓÉ¿ØÖƽű¾ÖÐÊý¾ÝµÄÊä³ö¡£Ëü·Ç³£µØÓÐÓã¬ÌرðÊǶÔÓÚ£ºµ±ÄãÏëÔÚÊý¾ÝÒѾ­Êä³öºó£¬ÔÙÊä³öÎļþÍ·µÄÇé¿ö¡£Êä³ö¿ØÖƺ¯Êý²»¶ÔʹÓà header() »ò setcookie(), ·¢Ë͵ÄÎļþÍ·ÐÅÏ¢²úÉúÓ°Ïì,Ö»¶ÔÄÇЩÀàËÆÓÚ echo() ºÍ PHP ´úÂëµÄÊý¾Ý¿éÓÐ×÷Óá£
ÎÒÃÇÏȾÙÒ»¸ö¼òµ¥µÄÀý×Ó£¬Èôó¼Ò¶ÔOutput ControlÓÐÒ»¸ö´ ......

PHP»º´æ¼¼ÊõÏê̸

Ò»¡¢ÒýÂÛ
PHP,Ò»ÃÅ×î½ü¼¸ÄêÐËÆðµÄwebÉè¼Æ½Å±¾ÓïÑÔ,ÓÉÓÚËüµÄÇ¿´óºÍ¿ÉÉìËõÐÔ,½ü¼¸ÄêÀ´µÃµ½³¤×ãµÄ·¢Õ¹,phpÏà±È´«Í³µÄaspÍøÕ¾,ÔÚËÙ¶ÈÉÏÓоø¶ÔµÄÓÅÊÆ,Ïëmssqlת6ÍòÌõÊý¾ÝphpÈçÐèÒª40Ãë,asp²»ÏÂ2·ÖÖÓ.µ«ÊÇ,ÓÉÓÚÍøÕ¾µÄÊý¾ÝÔ½À´Ô½¶à,ÎÒÃÇ¿ÊÇóÄܸü¿ìËٵĵ÷ÓÃÊý¾Ý,²»±ØҪÿ´Î¶¼´ÓÊý¾Ý¿âµô,ÎÒÃÇ¿ÉÒÔ´ÓÆäËûµÄµØ·½,±È·½Ò»¸öÎļþ,»òÕßij¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ