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
Ïà¹ØÎÊ´ð£º
ÎÒ֮ǰµ¼ÈëµÄÊý¾Ý¿â£¬ÏÖÔÚɾ³ý²»ÁË£¬ÓÃÁËÃüÁîÐк͹¤¾ß¶¼²»ÐУ¬ÖØÆôÒ²²»ÐУ¬ÕâÊÇΪʲôÄØ£¿
ÄãÊÇÈçºÎɾ³ýµÄ£¿
ÓÐʲôÌáʾ£¿
ÎÊÌâ˵Ã÷Ô½Ïêϸ£¬»Ø´ðÒ²»áԽ׼ȷ£¡²Î¼ûÈçºÎÌáÎÊ¡££¨ÌáÎʵÄÖǻۣ©
......
Winform+MySQL×öÏîÄ¿£¬ÔÚ×¢ÖØÐÔÄܵÄÇé¿öÏ£¬ÎÒ¸ÃÈçºÎÈ¥Íê³ÉÕâÀàÐ͵ÄÏîÄ¿ÄØ£¡
Çë¸÷λ¸øÒÔÌáʾ¡£
ÄãÕâ¸ö·¶Î§Ì«¹ãÁË£¬ÎÒ˵2µãÖØÒªµÄ°É
1.WINFORM³ÌÐòÊǵ¥¶ÀÔËÐеÄCS³ÌÐò£¬ºÍBS²»Í¬£¬BSµÄѹÁ¦Ê¼ÖÕ¶¼ÔÚSERVERÉϵģ¬¶ÔC ......
ÎÒÓÃsocket+mysql½øÐÐÍøÂç±à³Ì.
ÓÃUDP¡£
ÏÖÔÚÓÐ2¸öÎÊÌâÇë½Ì
1.ÎÒÓ¦¸ÃÏÈÁ¬½Ómysql.È»ºóÊÕµ½Ò»¸öÓû§ÏûÏ¢ºó¾Í¿ªÆôÒ»¸öÏß³Ì,¸ù¾ÝÏûÏ¢µÄÄÚÈÝ¿ÉÄÜ»áÖ´ÐвåÈë»ò²éѯ»ò¸üлòɾ³ýÆäÖÐÒ»ÖÖ²Ù×÷.
ÎÒÊÇËùÓÐÏ̶߳¼Ê ......
µÚÒ»´Î°²×°MySQLʱ£¬·þÎñÄÜÆô¶¯£¬»ØÀ´ÓÖжÔØÁË¡£µÈÔÙ°²×°MySQLµÄºó£¬·þÎñ¾Í²»ÄÜÆô¶¯ÁË£¬±¨ÔÚ±¾µØ¼ÆËã»úÎÞ·¨Æô¶¯MySQL·þÎñ¡£´íÎó 1067£º½ø³ÌÒâÍâÖÕÖ¹µÄ´íÎó¡£ÇëÎÊÕâ¸öÎÊÌâÔõô½â¾ö°¡£¿
¿´¿´Õâ¸öÄܲ»ÄÜ°ïÄã
http:/ ......
ÏÖÔÚ×ö¶«Î÷ÒªMySQL£¬Ï£Íû´ó¼Ò½²Ò»ÏÂMySQLÖ§³ÖÄÄЩË÷Òý£¬¶øÇÒʲôʱºò½¨Ê²Ã´Ë÷Òý£¬ÒÔ¼°½¨Á¢ÔÚÄÄЩ×Ö¶ÎÉÏ£¬Ï£Íû¸ßÊÖÀÏÄñ´Í½Ì¡£¡£
×îºÃÊÇ×Ô¼ºÁìÎòµÄµÃ³öµÄ½áÂÛ×îºÃ¡£¡£
Thanks
ºÜ¸´ÔÓµÄÎÊÌ⣬һ°ãÔÚ²éѯ¡¢Á¬½ÓÉ ......