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

mysql¹ý³ÌÓαê

DELIMITER $$
DROP PROCEDURE IF EXISTS `heli`.`prodtest` $$
CREATE PROCEDURE `heli`.`prodtest` ()
BEGIN
  /*¾Ö²¿±äÁ¿µÄ¶¨Òå declare*/
  declare pid varchar(45) default '';
  declare pq int default 0;
  declare pk double default 0.0;
  declare cur1 CURSOR FOR SELECT product_id,product_quantity,product_kg from productstock;
  /* ÓαêÒì³£ºóÉèÖÃpidΪNULL */
  declare CONTINUE HANDLER FOR SQLSTATE '02000' SET pid = null;
  /*¿ªÓαê*/
     OPEN cur1;
        FETCH cur1 INTO pid,pq,pk;
        WHILE (pid is not null) DO
            /* dosomething */
            select pid,pq,pk;
            FETCH cur1 INTO pid,pq,pk;
        END WHILE;
     CLOSE cur1;
END $$
DELIMITER ;


Ïà¹ØÎĵµ£º

MySQLµÄcµ÷ÓÃ


1. ¸½¼ÓÏîÒ»¶¨ ¼ÓÉÏlibmysql.lib¡£
2. include Ò»¶¨¼ÓÉÏ mysqlµÄinclude£¨ÒòΪҪÅÜÕâ¹Ø¼üÒ»¾ä
#include <mysql.h>£©
3  lib Ò»¶¨¼ÓÉÏ mysqlµÄlib
 
ºÃÁËÏÂÃæÊÇʵÀýºÍphpº¯Êý»ù±¾Ò»ÑùµÄ¡£±¾È˲»¿ÉÄܸøÄã·­ÒëÎĵµ£¬º¯Êý²»¶®×Ô¼º¿´¡£
#include
<windows.h>//ÓÃÕâ¸ö·½±ã£¬°üº¬winsock.hËùÒ ......

¡¶PHP Óë MySQL Web ¿ª·¢¡·¶ÁÊé±Ê¼Ç £¨Ò»£©

¸ÅÊö
1.PHP ÊÇʲô£¿
   PHP ÊÇ·þÎñÆ÷¶Ë½âÊ͵Ľű¾ÓïÑÔ£¬ËüÊÇÄ¿Ç°×îÁ÷ÐÐµÄ web ±à³ÌÓïÑÔÖ®Ò»¡£  ÔÚÒ»¸ö HTML Ò³ÃæÖпÉÒÔǶÈëPHP´úÂ룬ÕâЩ´úÂëÔÚÿ´ÎÒ³Ãæ·ÃÎÊʱִÐС£PHP ´úÂ뽫ÔÚ Web ·þÎñÆ÷Öб»½âÊͲ¢ÇÒÉú³É HTML»òÕß·ÃÎÊÕß¿´µ½ÆäËûÊä³ö½á¹û¡£
2.My SQL ÊÇʲô£¿
   My SQL ÊÇ»ùÓÚ SQL µÄÍê ......

MySQLÊ®ÌõÌØÊâ¼¼ÇÉ

MySQLÒ×ѧÒ×Óã¬ÇÒ¸½´ø·á¸»µÄ¼¼ÊõÎĵµ£¬Õâ¶þ¸öÒòËØʹ֮±»¹ã·ºÓ¦Óá£È»¶ø£¬Ëæ×ÅMySQL·¢Õ¹Ö®Ñ¸ËÙ£¬¼´Ê¹Ò»¸öMySQLÀÏÊÖÓÐʱҲ»áΪ¸ÃÈí¼þ³öÆä²»ÒâµÄ¹¦ÄܸÐ̾¡£±¾ÎĽ«ÎªÄã½éÉÜÕâЩ²»ÎªÈËÖªµÄÌØÐÔ¡£
ÒÔXML¸ñʽ²é¿´²éѯ½á¹û
ͨ¹ýʹÓô«Í³—xml
Ñ¡Ïîµ÷ÓÃMySQLÃüÁîÐпͻ§³ÌÐò£¬Äã¿ÉÒÔÒÔXML¸ñʽ(¶ø²»ÊÇ´«Í³µÄÁбíÐÎʽ)À´²é¿´M ......

MySQL µÄǶÌײéѯ

×î½üÔÚMySQLÉÏ×öÁ˵㹤×÷£¬·¢ÏֺܶàÈ˶¼ÔÚѯÎÊMySQLǶÌײéѯµÄÎÊÌ⣬Ðí¶àÈ˶¼¾õµÃMySQL²»Ö§³ÖǶÌײéѯ£¬ÆäʵMySQl´Ó4.11°æºóÒѾ­ÍêÈ«Ö§³ÖǶÌײéѯÁË£¬ÄÇôÏÂÃæÎÒ¾ÙЩ¼òµ¥µÄǶÌײéѯµÄÀý×Ó°É£¨Ô´³ÌÐòÀ´×ÔMySQL User Manual£©£º
1. SELECTÓï¾äµÄ×Ó²éѯ:
Óï·¨: SELECT ... from (subquery) AS name ...
ÏÈ´´½¨Ò»¸ö±í:
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ