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

mysql´¢´æ¹ý³ÌµÄÎÊÌâ

ÎÒÏÖÔÚѧϰMYSQL£¬ÎÊÏÂmysql´¢´æ¹ý³ÌÈçºÎ½¨Á¢ºÍʹÓã¬×îºÃд³É$sql="sqlÓï¾ä",$re=mysql_query($sql);лл
½¨ÒéÄãÏÈ×Ô¼º¿´Ò»ÏÂÎĵµÖеÄÀý×Ó¡£

http://dev.mysql.com/doc/refman/5.1/zh/stored-procedures.html
20. ´æ´¢³ÌÐòºÍº¯Êý
20.1. ´æ´¢³ÌÐòºÍÊÚȨ±í
20.2. ´æ´¢³ÌÐòµÄÓï·¨
20.2.1. CREATE PROCEDUREºÍCREATE FUNCTION
20.2.2. ALTER PROCEDUREºÍALTER FUNCTION
20.2.3. DROP PROCEDUREºÍDROP FUNCTION
20.2.4. SHOW CREATE PROCEDUREºÍSHOW CREATE FUNCTION
20.2.5. SHOW PROCEDURE STATUSºÍSHOW FUNCTION STATUS
20.2.6. CALLÓï¾ä
20.2.7. BEGIN ... END¸´ºÏÓï¾ä
20.2.8. DECLAREÓï¾ä
20.2.9. ´æ´¢³ÌÐòÖеıäÁ¿
20.2.10. Ìõ¼þºÍ´¦Àí³ÌÐò
20.2.11. ¹â±ê
20.2.12. Á÷³Ì¿ØÖƹ¹Ôì
20.3. ´æ´¢³ÌÐò¡¢º¯Êý¡¢´¥·¢³ÌÐòºÍ¸´ÖÆ£º³£¼ûÎÊÌâ


¾ÍÒòΪÕâ¸ö²»Ì«¶®£¬ÎÒ¾ÍÊDz»»áÔõôÄܺÍPHP½áºÏµÄÎÊÌ⣡Íû½â´ð£¡

PHP code:
<?php
// Connecting, selecting database
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_database') or die('Could not select database');

// Performing SQL query
$query = 'SELECT * from my_table';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

// Printing results in HTML
echo "<table>\n&qu


Ïà¹ØÎÊ´ð£º

Çómysql+php ÖÐÎÄÈ«ÎÄËÑË÷

×ö¸öÕ¾ÄÚËÑË÷£¬ÏÖÔÚÓÃlike ÕâÑùµÄЧÂÊʵÔÚÌ«µÍÁË£¬Ïë¸Ä³ÉÈ«ÎÄËÑË÷·½Ê½¡£

µ«¿´ÁËÍøÉÏ˵µÄÖÐÎÄÖ§³Ö²»ºÃ£¬ÏëÎÊһϸ÷λÐÖµÜÊÇÈçºÎ½â¾öÕâ¸öÎÊÌâµÄ£¿
µ¥¶À½¨Á¢Ö÷Ìâ±íºÍÄÚÈÝ±í ¼ìË÷Ö÷Ìâ

È»ºó¸ù¾ÝÖ÷Ìâ¼ìË÷Ä ......

mysqlÈçºÎʵÏÖ¸ßЧµÄËÑË÷£¿

Ò»¸öÐÐÒµÍøÕ¾£¬ÒªÊµÏֵŦÄÜÒªÇóΪ£º

Ò»ËÑË÷±íµ¥¿ÉÑ¡ËÑË÷ ²úÆ·/×ÊѶ/É̼ң¬ËÑË÷ʱϣÍûÏÈËѱêÌâºóÈ«ÎÄ£¬µ±Ç°µÄÊý¾ÝÁ¿¹À¼Æ3Íò¶à£¬¶¨Î»ÆÚÍûÔÚ°ÙÍò¼¶Ò²¿ÉÓá£

Êý¾ÝÀàÐÍΪinnodb£¬µ±Ç°µÄ·½·¨ÊǶԹؼü´Ê½øÐÐ ......

MySQLÊý¾Ý°ü¹ý´ó

ÎÒÓÃÒ»¸öÑ­»·ÍùÊý¾Ý¿âÀïÃæ´æÎļþ£¬±¾À´¿ÉÒÔ×÷ΪÎļþ´æ·ÅÊý¾Ý¿âÀïÃæÖ»·ÅÎļþµÄλÖõ쬵«ÊÇûÓа취×âµÄ·þÎñÆ÷ÍøÒ³¿Õ¼ä´óСÓÐÏÞÖÆÊý¾Ý¿âûÓÐÏÞÖÆ¡£Óï¾äÊÇÕâÑùµÄ


public static final DataBase.MAXSIZE=102 ......

¶àÏß³Ì Mysql Çó¾È

ÎÒÓÃsocket+mysql½øÐÐÍøÂç±à³Ì.
ÓÃUDP¡£
ÏÖÔÚÓÐ2¸öÎÊÌâÇë½Ì
1.ÎÒÓ¦¸ÃÏÈÁ¬½Ómysql.È»ºóÊÕµ½Ò»¸öÓû§ÏûÏ¢ºó¾Í¿ªÆôÒ»¸öÏß³Ì,¸ù¾ÝÏûÏ¢µÄÄÚÈÝ¿ÉÄÜ»áÖ´ÐвåÈë»ò²éѯ»ò¸üлòɾ³ýÆäÖÐÒ»ÖÖ²Ù×÷.
ÎÒÊÇËùÓÐÏ̶߳¼Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ