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

³õѧPHP,Êý¾Ý¼¯Ôõô´¦Àí³ÉÊý×é - PHP / »ù´¡±à³Ì

±ÈÈçÎҵIJéѯÓï¾äÊÇ"select username,sex,age from users"
ÎÒÔõôÄܰѲ鵽µÄ½á¹ûÓëÊý×é°ó¶¨
Çë¸ø³öÍêÕû´úÂë
$sql = "select username,sex,age from users";
$query= mysql_query($sql);
while($fetch=mysql_fetch_array($query)){
$array[] = array(
'sex' => $fetch['sex'],
'username' => $fetch['username'],
  'age' => $fetch['age'],
);
}

PHP code:

$result = mysql_query($_sql, $this->m_database) ;
// »ñµÃ²éѯµÄ½á¹û´æÈëArray
$queryResult = array ();
while ( $row = mysql_fetch_assoc ( $result ) ) {
$queryResult [] = $row ;
}

// ÊÍ·Å
mysql_free_result ( $result );

// ²éѯµÄ½á¹û·µ»ØArray
return $queryResult;






ÒýÓÃ
PHP code

$result = mysql_query($_sql, $this->m_database) ;
// »ñµÃ²éѯµÄ½á¹û´æÈëArray
$queryResult = array ();
while ( $row = mysql_fetch_assoc ( $result ) ) {
$q¡­¡­

ÆäÖÐ $_sqlÊÇÒªÖ´ÐеÄsqlÓï¾ä£¬$this->m_database ¿ÉÒÔÌæ»»³ÉÄãÒª²éѯµÄÊý¾Ý¿â×Ö·û´®

ÒýÓÃ
ÒýÓà 2 Â¥ ripya µÄ»Ø¸´:
PHP code

$result = mysql_query($_sql, $this->m_databa


Ïà¹ØÎÊ´ð£º

ÈçºÎ¶¨ÆÚɾ³ýmysqlÊý¾Ý - PHP / »ù´¡±à³Ì

ÇëÎÊÏÂÄܲ»ÄÜÔÙwindows϶¨ÆÚÇå¿ÕmysqlÒ»¸ö±íÖеÄÈ«²¿Êý¾Ý£¬ÓÃPHPʵÏÖ£¡
лл¸÷λÁË
¾Í±ÈÈçÒ»¸öÐÇÆÚÇå¿ÕÒ»´Î
±ÈÈçÿ¸öÐÇÆÚÁùÁãµãÇå¿ÕÒ»´Î£¡
ллÁË

¼Æ»®ÈÎÎñ...php....sql...truncate....OK

Äã¾ÍÕâ½ÓÔÚҳà ......

Î人ÄÄÀïPHPÅàѵ±È½ÏÕý¹æ - PHP / »ù´¡±à³Ì

¹ýÍêÄêҪȥÎ人ÁË£¬ÏëÁ˽âÒ»ÏÂPHPÅàѵ±È½ÏÕý¹æ?

Ŷ ¶ÔÁË£¬»¹ÓУ¡PHPÊÖ²á±ØÐëµÃŪһ¸ö

àÅ ÌìÌìÔÚ¿´Ê¥¾­£¨Ò»ÌìÒ²¾ÍÖ»ÄÜ¿´¸ö¶þʮҳ£©£¬PHP100ÊÓÆµ½Ì³Ì¿´ÁË33½²ÁË£¨Ò»ÌìÒ²Ö»¿´Ò»½²£©
ÎÒ»á¼á³Ö°ÑÕâ±¾ÊéºÍÊÓÆµ¸ã¶¨ ......

ÎÊÒ»¸öPHPºÍsmartyµÄÈÕÆÚÎÊÌâ - PHP / »ù´¡±à³Ì

index.phpÄÚÈÝ£º
  $smarty->assign('name',strtotime('-0'));
  $smarty->display("index.html");
index.htmlÄÚÈÝ£º
{$name|date_format:'%Y-%m-%d'}<hr>
{$ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ