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

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²ÉÓÃʲô¼ÓÃÜ·½Ê½²»±»Æƽ⣿ - PHP / »ù´¡±à³Ì

zend guard¼ÓÃܵÄphpÊÇ¿ÉÒÔÆƽâµÄ£¬ÓÐµÄ ËµÊÇʹÓú¯Êý»ìÏý¿ÉÒÔ¸üÄÑÆƽâһЩ¡£ÔõôʹÓÃÄØ¡£
»òÕß´ó¼Ò¸æËßÎÒÄÄÖÖ¼ÓÃÜ·½Ê½¸ü°²È«¡£Ð»Ð»ÁË¡£
ÎÒÄ¿Ç°µÄzend guard°æ±¾ÊÇ4.0.1
ÎÞ½â

ÒýÓÃ
ÎÞ½â
²»¿ÉÄÜ°É¡£ÔÚÍøÉϲéÁ ......

mysqlÎÊÌ⣡ - Java / Java SE

String sqlCount="select count(*) from usertable where username='"+
userName+"'";Õâ¾ä»° ʲôÒâ˼°¡£¡
Õâ¾ä»°Êä³ö³öÀ´¾ÍÊÇ
select count(*) from usertable where username='ÄãµÄ±äÁ¿ ......

phpÁª½Ó¶à¸öÊý¾Ý¿âµÄÎÊÌâ

mssql_select_db("f1",mssql_connect("localhost","sa","sa"));
mssql_select_db("f2",mssql_connect("192.168.0.1","sa","sa") ......

phpÎļþµ÷ÓÃjsÎļþÀïµÄ·½·¨£¿ - PHP / »ù´¡±à³Ì

¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
»òÕßÔÚjsÎļþÀïµ÷ÓÃphpÎļþдµÄseesion£¿
PHP¸ÕÈëÃÅѧϰ,ÓÑÇ鶥һ¸ö


¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
//echo '<script>alert("ok");< ......

ÓÃphp±¸·ÝÊý¾Ý¿â³É¹¦£¬»¹Ô­Ê±³ö´í - PHP / ¿ªÔ´×ÊÔ´

ÊÇÓñðÈËдµÄÀà×öµÄ£¬»¹Ô­Ê±ÌáʾYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO admin(seq,passwd,type,n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ