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

Çë½ÌÒ»¸ömysql triggerµÄÎÊÌâ

ÇëÎÊÔÚmysqlµÄupdate triggerÖУ¬ÈçºÎ»ñÈ¡µ±Ç°Ö´ÐеÄsqlÓïÖеÄwhereÌõ¼þ£¬Ð»Ð»
ÎÊÌâ±È½ÏÆæ¹Ö£¬ÎªÊ²Ã´ÒªÕâÑù£¿

ÔÚtriggerÖлñÈ¡µ½Óï¾äÒª×öʲôÄØ


ÎÒµÄÕâ¸öupdate trigger¸üеÄÊÇmemcache£¬¶øÎÒ»¹Òª´ÓmemcacheÖÐÈ¡³öÊý¾Ý£¬»¹Ô­µ½oracleÖУ¬ËùÒÔ£¬ÒªÈ¡µÃmysqlÖ´ÐеÄsqlÓï¾äµÄÌõ¼þ

лл£¬ÈçºÎ¿ÉÐеĻ°£¬ÕâÊǸö·½·¨£¬ÎÒ¿ÉÒÔÊÔÊÔ£¬»¹ÓиüºÃµÄ·½·¨Âð

ÒýÓÃ
Èç¹ûÊÇ5ÒÔÉÏ£¬¿ÉÒÔ²éѯ
information_schema±íÖеÄinfo×Ö¶Î
SELECT * from information_schema.`PROCESSLIST` P
where and command='Query'
and state='executing'
and info='select ... your sql statement'

²éºóÔÙÈ¡ÄÚÈÝÖÐWHERE¡¡ºóÃæµÄÄÚÈÝ


¶øÎÒ»¹Òª´ÓmemcacheÖÐÈ¡³öÊý¾Ý£¬»¹Ô­µ½oracleÖУº
Äã¿ÉÒÔÓÃÒ»¸ö±í´æ·Å¸üÐÂÇ°memcacheµÄÖµ
triggerÖУº
insert into lsb values(old.memcache)

ÒýÓÃ
лл£¬ÈçºÎ¿ÉÐеĻ°£¬ÕâÊǸö·½·¨£¬ÎÒ¿ÉÒÔÊÔÊÔ£¬»¹ÓиüºÃµÄ·½·¨Âð

ÒýÓà 3 Â¥ wwwwa µÄ»Ø¸´:
Èç¹ûÊÇ5ÒÔÉÏ£¬¿ÉÒÔ²éѯ
  information_schema±íÖеÄinfo×Ö¶Î
  SELECT * from information_schema.`PROCESSLIST` P
  where and command='Query'
  and state='executing'
  and info='select ... your sql statement'

  ²éºóÔÙÈ¡ÄÚÈÝÖÐWHERE¡¡ºóÃæµÄÄÚÈÝ


Èç¹ûÄãÖ»ÊÇҪȡ¸üÐÂÇ°memcacheµÄÖµ£¬ÔÚTRIGGERÖÐÓÃold.memcache¾ÍOKÁË£¬±£´æµ½


Ïà¹ØÎÊ´ð£º

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

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

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

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

apache+PHP+mysqlÔÚwin7ÏÂʹÓÃ

ÈçÌ⣬ÕâÈý¸öÔÚwin7ÏÂʹÓûáÓÐʲô¼æÈÝÐÔÎÊÌâÂð£¿
ÓÉÓÚÎÒ×î½üÔÚʹÓÃwin7£¬¾ÍÀÁµÃ½øxpÁË£¡
×Ô¼ºÓÃwindows 2008ÓÐÒ»Äê¶àÁË£¬Ã»³öÏÖÈκÎÎÊÌâ¡£

win7²âÊÔ°æÒ²Óùý£¬²»»áÓÐʲôÎÊÌâµÄ£¬·ÅÐÄ¡£

µ±È»Äã×î ......

ÎÒÒª°Ñ×¢²áÐÅÏ¢Ìá½»µ½mysqlÖУ¬ÒªÔõô°ìÄØ£¿

ÎÒÔÚ×¢²áÒ³ÃæдÈëÁËÈçÏ´úÂ룺
<?php
    $conn=mysql_connect("localhost","root","614510")or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Ó´íÎó".mysql_error());
& ......

MySQLÈëÃÅ

MySQLÈëÃÅ
¿ÉÒÔÏÈ¿´Ê²Ã´Êé¼®°¡£¿
ÏȶÁÈý±é¡¶Êý¾Ý¿âϵͳ¸ÅÂÛ¡·,ÕÆÎÕÊý¾Ý¿âµÄ»ù´¡ÀíÂÛ¡£
È»ºóÔÙ´Ö¿´Ò»±éMYSQLµÄ¹Ù·½Îĵµ¡£ MySQL¹Ù·½Îĵµ http://dev.mysql.com/doc/refman/5.1/zh/index.html

¾ÍÕÒÒ»±¾ºÜ»ù´ ......

mysql ¼òµ¥ÎÊÌâ

¼ÙÈçÊý¾Ý¿âÖÐÓиötest±í£¬±íÖÐÓÐid£¬Name£¬num£¬¼Ç¼ʱ¼ä
idΪ×ÔÔö³¤Ö÷¼ü£¬nameÊÇÃû×Ö£¬num±íʾÆäÊýÁ¿

1  nike  100        ϵͳʱ¼ä
2  nike  300  &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ