PHPÏÔʾ´æÔÚMYSQLÖеĶàÕÅͼƬ - PHP / ¿ªÔ´×ÊÔ´
´ó¼ÒºÃ£¬ÎÒ°ÑͼƬ´æÔÚÁËMYSQLÊý¾Ý¿âÖУ¬ÏÖÔÚÎÒÏëÏÔʾÔÚWEBÒ³ÃæÉÏ¡£Åöµ½ÁËÁ½¸öÎÊÌâ¾ÍÊÇ 1£¬ÏÔʾͼƬµÄPHP´úÂë±ØÐ붥¸ñд£¬Ç°ÃæÈç¹ûÓдúÂëÊä³ö»òÓпոñÖ®Àà¾Í»áÊä³öÂÒÂë¡£´æÈëûÓÐÎÊÌ⣬ÎҾͲ»ÁгöÁË£¬ÏÔʾͼƬ´úÂëÏêϸÈçÏ£º
<?php
// Á¬½ÓÊý¾Ý¿â
$conn = mysql_connect("localhost", "root", "bowen");
mysql_select_db("books",$conn);
// Á¬½ÓÊý¾Ý¿â²éѯ
$sql="select * from image where id=111111";
$result=mysql_query($sql);
$num_results=mysql_num_rows($result);
$row=mysql_fetch_object($result);
echo $row->photo;
mysql_free_result($result);
mysql_close($conn);
?>
ÒÔÉÏ´úÂëÊÇÕý³£µÄ£¬¿ÉÒÔÏÔʾһ¸öͼƬ£¬µ«Èç¹ûд³ÉÏÂÃæÕâÑù£¬¾Í»áÊä³öÂÒÂë¡£
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
<?php
// Á¬½ÓÊý¾Ý¿â
$conn = mysql_connect("localhost", "root", "bowen");
mysql_select_db("books",$conn);
// Á¬½ÓÊý¾Ý¿â²éѯ
$sql="select * from image where id=111111";
$result=mysql_query($sql);
$num_results=mysql_num_rows($result
Ïà¹ØÎÊ´ð£º
×î½üÒ»¸öÏîÄ¿ÖÐÓöµ½Ò»¸öÎÊÌ⣺ÔÚÔÓеÄÒ»Ì×ϵͳÖÐ(php¿ª·¢)Ìí¼ÓһЩС¹¦ÄÜ(jsp¿ª·¢)£¬ÔÀ´Óû§ÏµÍ³¶¼ÊÇphp¿ª·¢µÄ£¬ÎÒÈçºÎÔÚjsp¿ª·¢µÄ¹¦ÄÜÖÐ×öµ½Óû§ÐÅÏ¢sessionͬ²½ÄØ£¿ ÓÐÈËÊÇ·ñÓÐ×ö¹ýÀàÒÔÏîÄ¿£¬ÏëÌýÌý´ó¼ÒµÄ¿´·¨
......
ÔÚfirefoxä¯ÀÀÆ÷ÏÂÕý³£µÇ½£¬µ«ÔÚIE ä¯ÀÀÆ÷ÏÂÎÞ·¨µÇ½£¬Ã¿´Î¶¼»áÖØÐÂÉú³ÉÒ»¸ösession,ÔÀ´µÄÄÚÈݻᶪʧ¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£Ôõô»ØÊÂ......
¾ßÌåÇé¿ö£¿²Â²â¿ÉÄÜÊÇÄã±¾»úIEµÄcookie±»½ûÓÃÁË°É£¬¿ÉÒÔ¿´¿´
cookie Æ ......
sp ³ÌÐò
delimiter //
create procedure ma()
begin
declare i int default 0;
while i<11 do
set i=i+1;
select i;
end while;
end //
delimiter ;
1+2+...+9+10
ΪʲôÕâ¸ö³ÌÐòÎÞ·¨ÊµÏÖÀÛ¼ÓЧ¹û
/ ......
ÍøÉϺöà¶þ¼¶Áª¶¯µÄ£¬Ö»ÊǶ¼Ã»ÓвÉÓÃAccessÊý¾Ý¿âµÄ£¬php²»ÊìϤ£¬ÓÐÁ½¸öÊý¾Ý±í·Ö±ðΪlb(Àà±ð£º±àºÅ£¬Àà±ðÃû³Æ£©into_product(²úÆ·¹ÜÀí£ºid,Ãû³Æ£¬Àà±ðµÈ×ֶΣ©
ÏëҪʵÏÖ£ºµÚÒ»¸öÏÂÀ²Ëµ¥Ñ¡ÔñÍêÀà±ðºó£¬µÚ¶þ²Ëµ¥¾Í°Ñ ......