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

PHPÁ¬½ÓMYSQLÊý¾Ý¿â

<p>04¼¶ÐÂÉúÃûµ¥</p>
<table border="1" width="80%" cellpadding="0">
<tr>
<td width="10%" align="center">Id</td>
<td width="20%" align="center">Name</td>
<td width="10%" align="center">Age</td>
<td width="10%" align="center">Sex</td>
<td width="30%" align="center">Address</td>
<td width="20%" align="center">DoWith</td>
</tr>
<?php
//Á¬½ÓÊý¾Ý¿â
//´ò¿ªÒ»¸öÁ¬½Ó,Á¬½Óµ½±¾µØmysqlÊý¾Ý¿â
$conn=mysql_connect("localhost","root","dalyluo");//ip£¬user£¬pwd
//Ñ¡Ôñ²Ù×÷µÄ×ÊÁÏ¿â
mysql_select_db("test",$conn);// ×ÊÁÏ¿âÃû³Æ,Á¬½Ó
$sql="select * from student";

//ÓÃmysql_queryº¯Êý´Ó×ÊÁÏ¿âÖвéѯ
mysql_query("set names gbk");//´¦ÀíÖÐÎÄÂÒÂëÎÊÌ⣬gbk¿ÉÒÔÊÇÆäËüÖµ
$result=mysql_query($sql,$conn);// search sql, connection
//Ñ­»·¶ÁÈ¡¼Ç¼
while($row=mysql_fetch_array($result)){
?>
<tr>
<td width="10%" align="center"><?php echo $row["stuid"] ?></td>
<td width="20%" align="center"><?php echo $row["stuname"] ?></td>
<td width="10%" align="center"><?php echo $row["stuage"] ?></td>
<td width="10%" align="center"><?=$row["stusex"]?></td>
<td width="30%" align="center"><?=$row["stuaddress"]?></td>
<td width="20%" align="center"><a href="#" mce_href="#" onClick="<?php doDel($row["stuid"]) ?>">ɾ³ý</a></td>
</tr>
<?php
}
//¹Ø±ÕÁ¬½Ó
mysql_close($conn);
function doDel($sid){
global $conn;
mysql_select_db("test",$conn);
$del_sql="delect from student where stuid="+$sid;
mysql_query($del_sql,$conn);
}
?>
</table>


Ïà¹ØÎĵµ£º

MYSQLÖÐͳ¼Æ²éѯ½á¹û×ÜÐÐÊýµÄ±ã½Ý·½·¨¡¾×ªÔØ¡¿

ת×Ô£ºhttp://ginew.blog.163.com/
½ñÌìÔĶÁ wordpress´úÂëʱ£¬·¢ÏÖÒ»¸öMYSQLµÄ¹Ø¼ü´Ê SQL_CALC_FOUND_ROWS ²é¿´ÊÖ²áºó·¢Ïִ˹ؼü´ÊµÄ×÷ÓÃÊÇÔÚ²éѯʱͳ¼ÆÂú×ã¹ýÂËÌõ¼þºóµÄ½á¹ûµÄ×ÜÊý£¨²»ÊÜ Limit µÄÏÞÖÆ£©
ÀýÈ磺 SELECT SQL_CALC_FOUND_ROWS tid from cdb_threads WHERE fid=14 LIMIT 1,10;
¼ÙÉèÂú×ãÌõ¼þµÄÓÐ1000Ìõ£¬Õâ ......

PHP»º´æ¼¼ÊõÏê½â

PHP»º´æ¼¼ÊõÏê½â
Ò»¡¢»º´æ¼¼Êõ:   
ÓÐЩÐÅÏ¢±È·½¾­³£²»±äµÄ,µ«ÊÇ»¹ÊÇÄܱäµÄÐÅÏ¢·ÅÔÚ»º´æÖÐÒÔ¼Ó¿ìÏÔʾËÙ¶È,ÕâÊǺÜÓмÛÖµµÄ,ËùνµÄ»º´æ,ͨË×µÄÀí½â¾ÍÊÇһЩ±£´æÔÚ·þÎñÆ÷¶ËµÄ¹²ÓÃЊϢ.ËüÊÇÓÚ·þÎñÆ÷ͬÉúËÀµÄ,ÎÒÃÇÔÚ±£´æ»º´æµÄʱºò¿ÉÒÔÖ¸¶¨Ï´θüеÄʱ¼äµÄÅжÏ,±È·½ÒªÔÚ5·ÖÖÓ¸üÐÂÒ»´Î,¿ÉÒԼǼÉϴθüеÄʱ¼ ......

PHP»·¾³ÅäÖÃÐĵÃ


PHP»·¾³ÅäÖÃÐĵÃ
ApacheµÄÅäÖÃ
Ê×ÏÈÎÒÔÚhttp://httpd.apache.org/download.cgiϵÄÊÇ“Win32 Binary without crypto (no mod_ssl) (MSI Installer): httpd-2.2.15-win32-x86-no_ssl.msi”¡£°²×°ÄÇÊÇС¶ù¿ÆÀ²£¬ÏÂÒ»²½ÏÂÒ»²½¡£ÎҾͲ»ËµÁË¡£
°²×°Íêºó¾ÍÒª¿ªÊ¼ÅäÖÃÁË£¬ ......

дPHP»¹ÊÇZendºÃÓÃ


ÎÒ×îÔç½Ó´¥µÄ±à³Ì¹¤¾ßÊÇDreamweaver£¬ÆäʵӦ¸ÃÊÇ×¼±à³Ì¹¤¾ß°É£¬ÎÒÄÇʱºòÓõĺÃÏñÊÇ
4£¬Èç¹ûÎÒûÓмǴíµÄ»°£¬È»ºóºóÀ´»¹ÓÐÒ»¸ö°æ±¾½ÐUtralµÄ£¬´Ó×î³õÆڵİ汾һֱµ½ÏÖÔÚµÄCS4£¬µ±ÄêµÄMicromedia¹«Ë¾ÒѾ­±»Adobe¹«Ë¾
ÊÕ¹ºÁË£¬ÎÒ»¹ÊÇÔÚÓá£ÔÚHTMLµÄ±à¼­·½Ã棬DWÓÐ×ÅÎ޿ɱÈÄâµÄÓÅÊÆ£¬ÎÒÏÖÔÚд.Net»¹ÊÇÏ°¹ßÔÚDWÀï½øÐÐÒ³Ãæ²¼¾ ......

mysqlÂÒÂëÎÊÌâ½â¾ö·½°¸

1.       °²×°mysqlµÄʱºòÑ¡Ôñ×Ö·û¼¯utf8
2.       °²×°½áÊøºóÐÞ¸Ämy.ini,ÓÐÁ½¸öµØ·½ÒªÐ޸ģ¬
[mysql] default-character-set=gbk
 
# The default character set that will be used when a new schema or table is
# created and no character set ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ