µù¥U
µn¿ý
º¶
½×¾Âª©³W
¸T¤î¦Cªí
»¡©ú
¦a¹Ï
¼Æ¦ì®Ñ»
¨p¤H®ø®§ (0)
¤½¦@®ø®§ (0)
½×¾Â¥ô°È (0)
¨t²Î®ø®§ (0)
¦n¤Í®ø®§ (0)
©«¤l®ø®§ (0)
³Â»¶®a±Ú°Q½×ª©ª©
»
PHP
»
PHP+MySQL ¤Jªù¹ê§@
» 8-1-3 ¸ê®Æ¿ý¦ì¸mÅÜ´«
ªð¦^¦Cªí
¤U¤@¥DÃD
¤W¤@¥DÃD
µo©«
8-1-3 ¸ê®Æ¿ý¦ì¸mÅÜ´«
¤p»x
µoµu®ø®§
¥[¬°¦n¤Í
¤p»x
(¤p»x)
·í«eÂ÷½u
´¿¸g¤]¬O¤ô¹q¤u
UID
9
©«¤l
1190
¥DÃD
394
ºëµØ
113
¿n¤À
1747
ª÷¿ú
1747
ÂI¦W
1
§@·~¨t²Î
Vista
³nÅ骩¥»
Office 2003
¾\ŪÅv
200
©Ê§O
¨k
¨Ó¦Û
¥xÆW
¦b½u®É¶¡
490 ¤p®É
µù¥U®É¶¡
2010-5-1
³Ì«áµn¿ý
2024-11-25
¡@¼ÊºÙ:
¤p»x
¡@ÀY»Î:
´¿¸g¤]¬O¤ô¹q¤u
ºÞ²zû
©«¤l
1190
¥DÃD
394
ºëµØ
113
¿n¤À
1747
ÂI¦W
1
§@·~¨t²Î
Vista
³nÅ骩¥»
Office 2003
¾\ŪÅv
200
©Ê§O
¨k
¨Ó¦Û
¥xÆW
µù¥U®É¶¡
2010-5-1
³Ì«áµn¿ý
2024-11-25
1
#
¸õÂà¨ì
»
˧Ǭݩ«
¥´¦L
¦rÅé¤j¤p:
t
T
µoªí©ó 2011-4-20 10:11
|
¥u¬Ý¸Ó§@ªÌ
8-1-3 ¸ê®Æ¿ý¦ì¸mÅÜ´«
8-1-3 ¸ê®Æ¿ý¦ì¸mÅÜ´«
¦b¤W¤@¤p¸`¤¤¡A§Ṳ́wª¾¹D¡G§Q¥Î¡umysql_featch_array()¡v¨ç¼Æ¨ú±o¤@µ§¸ê®Æ¿ý¸ê®Æ«á¡A«h¡u§@¥Î¤¤¡vªº¸ê®Æ¿ý¦ì¸m·|¦Û°Ê²¾¨ì¤U¤@µ§©|¥¼´£¨ú¸ê®Æªº¸ê®Æ¿ý¦ì¸m¤W¡A¨ä¹êÁÙ¦³¤@Ó§Ö³tÅÜ´«§@¥Î¤¤¸ê®Æ¿ý¦ì¸mªº¨ç¼Æ¡Gmysql_data_seek()¡G
mysql_data_seek() ¨ç¼Æ
int mysql_data_seek ( int result_identifier, int row_number)
½Æ»s¥N½X
result_identifier¡Brow_number³£¬O¥²n°Ñ¼Æ¡Aresult_identifier°Ñ¼ÆÈ¥i¬°mysql_db_query()¡Bmysql_query()¡Bmysql_list_tables()¡Bmysql_list_dbs()µ¥¨ç¼Æ©Ò¦^¶Çªºµ²ªGID¡C
·íÅÜ´«§@¥Î¤¤¸ê®Æ¿ý¦ì¸m¦¨¥\¦^¶ÇtrueÈ¡A¤Ï¤§¡A¦^¶ÇfalseÈ¡F¨Ò¦p¡A§Ö³tÅÜ´«§@¥Î¤¤¸ê®Æ¿ý¦ì¸m¨ì²Ä¤@µ§¸ê®Æ¿ý¤W¡G
$datalist=mysql_query($SQL);
mysql_data_seek($datalist,0);
½Æ»s¥N½X
½Ðª`·N¡G¸ê®Æ¿ýªº¦ì¸m½s¸¹¬O±q0¶}©l¡I
Y§ÚÌ·Qª¾¨ì¦@¦³¦h¤Öµ§¸ê®Æ°O¿ý¥i´£¨ú¡A«h¡umysql_num_rows()¡v¨ç¼Æ¥i¥H§i¶D§ÚÌ¡G
mysql_num_rows() ¨ç¼Æ
int mysql_num_rows ( int result_ identifier)
½Æ»s¥N½X
result_identifier¬O¥²n°Ñ¼Æ¡A°Ñ¼ÆÈ¥i¬°mysql_db_query()¡Bmysql_query()¡Bmysql_list_tables()¡Bmysql_list_dbs()µ¥¨ç¼Æ©Ò¦^¶Çªºµ²ªGID¡C
¨Ò¦p¡G
//¸ê®Æ®w¦s¦b,«Ø¥ßSQL©R¥O¦r¦ê
$SQL="SELECT * FROM transcript";
//±N¦^¶Çµ²ªG¦s©ñ©óÅܼƤ¤
$datalist=mysql_query($SQL);
//¨ú±o¸ê®Æ¿ýµ§¼Æ
$x=mysql_num_rows($datalist);
echo "¦@ $X µ§¸ê®Æ°O¿ý";
½Æ»s¥N½X
¼Ó¥D¼ö©«
½×¾Â¤£Åý¸ê¾ú¤ñ¸û²Lªº¤H¤U¸ü¬d¬Ýªþ¥óªº¥Î·N
EXCEL±MÄÝ°Q½×°Ï¦Û§Y¤é°_¤¤¾Ç¥Í¥H¤W·|û¤è
³Â»¶®a±Ú°Q½×°Ï ³q¥Îª©³W
OFFICE °ò¦±Ð¾Ç¼Æ¦ì¤Æ
ATX ¹q·½¨ÑÀ³¾¹¤â°Ê±Ò°Ê(¤£±µ¥D¾÷ªO±Ò°Ê)
¦Ò¼{Ãö³¬½×¾Âºô¯¸
³Â»¶®a±Ú°Q½×°ÏÁô¨pÅv¬Fµ¦»¡©ú
³Â»¶®a±Ú°Q½×°Ï ¸Û¼xª©¥D
¥Ñ½׾ÂÂà¶iªº¤¤¾Ç¥Íµ¥¯Å¥H¤W·|û,½ÐÃöª`!
14-2 ¸ê®Æ®w¹Ï¤ù¦s¨ú
¦¬ÂÃ
¤À¨É
¤ß¦w¡A¥¦w
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!
¤p»x
µoµu®ø®§
¥[¬°¦n¤Í
¤p»x
(¤p»x)
·í«eÂ÷½u
´¿¸g¤]¬O¤ô¹q¤u
UID
9
©«¤l
1190
¥DÃD
394
ºëµØ
113
¿n¤À
1747
ª÷¿ú
1747
ÂI¦W
1
§@·~¨t²Î
Vista
³nÅ骩¥»
Office 2003
¾\ŪÅv
200
©Ê§O
¨k
¨Ó¦Û
¥xÆW
¦b½u®É¶¡
490 ¤p®É
µù¥U®É¶¡
2010-5-1
³Ì«áµn¿ý
2024-11-25
¡@¼ÊºÙ:
¤p»x
¡@ÀY»Î:
´¿¸g¤]¬O¤ô¹q¤u
ºÞ²zû
©«¤l
1190
¥DÃD
394
ºëµØ
113
¿n¤À
1747
ÂI¦W
1
§@·~¨t²Î
Vista
³nÅ骩¥»
Office 2003
¾\ŪÅv
200
©Ê§O
¨k
¨Ó¦Û
¥xÆW
µù¥U®É¶¡
2010-5-1
³Ì«áµn¿ý
2024-11-25
2
#
µoªí©ó 2011-4-20 10:11
|
¥u¬Ý¸Ó§@ªÌ
¥H½d¨Òex08_06.php¬°¨Ò¡A§ÚÌ¥i§Q¥Î¤Wz¨â¨ç¼Æקï¦p¤U¡AÅýµ{¦¡¥u¦C¦L¥X1,3,5¡Kµ¥³æ¼Æ½s¸¹ªº¸ê®Æ¿ý¡]½d¨Òex08_07.php¡^¡G
ex08_07.php
<?
$conn = mysql_connect("localhost", "root", "12345a");
if(@mysql_select_db("STUDENTS", $conn))
{
//«ü©w´£¨ú¸ê®Æªº®Õ¹ï¦r¤¸ªí
mysql_query("set character set big5");
//¸ê®Æ®w¦s¦b,«Ø¥ßSQL©R¥O¦r¦ê
$SQL="SELECT * FROM transcript";
//±N¦^¶Çµ²ªG¦s©ñ©óÅܼƤ¤
$datalist=mysql_query($SQL);
//¨ú±oÄæ¦ì¼Æ¶q
$fieldnum=mysql_num_fields($datalist);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>½d¨Òex08_07</title>
</head>
<center><table border=1 width=100%>
<?
/**************¦C¥XÄæ¦ì©ïÀY***************/
echo "<tr>";
for ($x=0 ;$x<$fieldnum;$x++)
{
echo "<td>" . mysql_field_name($datalist,$x) . "</td>";
}
echo "</tr>";
/**************¦C¥XÄæ¦ì¸ê®Æ***************/
//¨ú±o¸ê®Æ¿ý¼Æ¶q
$rowsnum=mysql_num_rows($datalist);
for ($y=0;$y<$rowsnum;$y+=2)
{
if($y<=$rowsnum):
//ÅÜ´«§@¥Î¤¤¸ê®Æ¿ý¦ì¸m
mysql_data_seek($datalist,$y);
//±N¸ê®Æ¿ýÂà´«¬°Äæ¦ì°}¦C¶°¦X
$fielddatas=mysql_fetch_array($datalist);
//¿é¥XÄæ¦ì¸ê®Æ
echo "<tr>";
for ($x=0;$x<$fieldnum;$x++)
{
echo "<td>" . $fielddatas[$x] . "</td>";
}
echo "</tr>";
endif;
}
?>
<table></body>
</html>
<?
}
else
{
echo "¸ê®Æ®w¤£¦s¦b";
}
?>
½Æ»s¥N½X
¤ß¦w¡A¥¦w
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!
TOP
ÀR«ä¦Û¦b :
¤f»¡¤@¥y¦n¸Ü¡A¦p¤f¥X½¬ªá¡F¤f»¡¤@¥yÃa¸Ü¦p¤f¦R¬r³D¡C
ªð¦^¦Cªí
¤U¤@¥DÃD
¤W¤@¥DÃD
EXCEL±MÄÝ°Q½×°Ï
Excel£¸¯ë°Ï
Excelµ{¦¡°Ï
¶i¶¥À³¥Î±M°Ï
OFFICE ¨t¦C
Word
PowerPoint
Access
Office¤£¤À°Ï
µ{¦¡»y¨¥
VB »P VB.Net
C »P C#
Java »P J#
µ{¦¡³]p¤£¤À°Ï
¸ê®Æ®w
ORACLE
My SQL
MS SQL
ºô¶³]p
ASP »P ASP.NET
PHP
PHP+MySQL ¤Jªù¹ê§@
JavaScript
FLASH / ActionScript
HTM/ HTML/ CSS
ºô¶³]p¤£¤À°Ï
¹q¸£»P§@·~¨t²Î
¹q¸£¦UºØµwÅé°Q½×
¤@¯ë¹q¸£³nÅé°Q½×
½×¾Â¨Æ°È
ºÞ²z¤½§i
§ë¶D¤Ï¬M
·s¤â´ú¸Õ
·R ¡E ¥Í¬¡
¤½¯q§G§iÄæ
¥Í¬¡»P·P°Ê
[¦¬Âæ¹¥DÃD]
[Ãöª`¦¹¥DÃDªº·s¦^´_]
[³q¹L QQ¡BMSN ¤À¨Éµ¹ªB¤Í]
¥Ó½Ð¤Í±¡Ãì±µ
Facebook¯»µ·