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

MySQLµÄdatetimeÉèÖõ±Ç°Ê±¼äΪĬÈÏÖµ


MySQLµÄdatetimeÉèÖõ±Ç°Ê±¼äΪĬÈÏÖµ 
ÓÉÓÚMySQLĿǰ×ֶεÄĬÈÏÖµ²»Ö§³Öº¯Êý£¬ËùÒÔÓÃ
create_time datetime default now()
µÄÐÎʽÉèÖÃĬÈÏÖµÊDz»¿ÉÄܵġ£
´úÌæµÄ·½°¸ÊÇʹÓÃTIMESTAMPÀàÐÍ´úÌæDATETIMEÀàÐÍ¡£
CURRENT_TIMESTAMP £ºµ±ÎÒ¸üÐÂÕâÌõ¼Ç¼µÄʱºò£¬ÕâÌõ¼Ç¼µÄÕâ¸ö×ֶβ»»á¸Ä±ä
¡£
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP £ºµ±ÎÒ¸üÐÂÕâÌõ¼Ç¼µÄʱºò£¬ÕâÌõ¼Ç¼µÄÕâ¸ö×ֶν«»á¸Ä±ä
¡£¼´Ê±¼ä±äΪÁ˸üÐÂʱºòµÄʱ¼ä¡££¨×¢ÒâÒ»¸öUPDATEÉèÖÃÒ»¸öÁÐΪËüÒѾ­ÓеÄÖµ£¬Õ⽫²»ÒýÆðTIMESTAMPÁб»¸üУ¬ÒòΪÈç¹ûÄãÉèÖÃÒ»¸öÁÐΪËüµ±Ç°µÄÖµ£¬MySQLΪÁËЧÂʶøºöÂÔ¸ü¸Ä¡££©Èç¹ûÓжà¸öTIMESTAMPÁУ¬Ö»ÓеÚÒ»¸ö×Ô¶¯¸üС£


Ïà¹ØÎĵµ£º

phpѧϰ±Ê¼Ç£¨12£©:PHP+MYSQLÁôÑ԰壨ÉÏ

require()  Óë  require_once()
    
      ͨ³£·ÅÔÚ PHP ³ÌÐòµÄ×îÇ°Ãæ£¬PHP ³ÌÐòÔÚÖ´ÐÐǰ£¬¾Í»áÏȶÁÈë require
ËùÖ¸¶¨ÒýÈëµÄÎļþ£¬Èç¹û³öÏÖ´íÎóÊÇÖÂÃüµÄ¡£
nclude()  Óë  include_once()
    
    &n ......

MySQL ×Ö·û´®º¯Êý£º×Ö·û´®½ØÈ¡

½ØÈ¡province×Ö·û´®ÖеÚÒ»¸ö<br>ǰµÄ×Ö·û´®¡«£¡
update lcjd
set  `province` = substring_index( `province` , '<br>', '1' );
ÔÚÐèÒªÌí¼Ó‘0’µÄλÖÃÌí¼ÓÒ»¸ö‘0’
update lcjd
set lc_name2 = concat('0', lc_name2)
WHERE length(lc_name2) = 3
http://www.sqlstudy.com/s ......

mysqlÊý¾Ý¿â·¶Ê½Ïê½â

ÔÚÉè¼Æ¹ØÏµÊý¾Ý¿âʱÊÇÒª×ñÊØÒ»¶¨µÄ¹æÔòµÄ¡£ÓÈÆäÊÇÊý¾Ý¿âÉè¼Æ·¶Ê½ÏÖ¼òµ¥½éÉÜ1NF£¨µÚÒ»·¶Ê½£©£¬2NF£¨µÚ¶þ·¶Ê½£©£¬3NF£¨µÚÈý·¶Ê½£©ºÍBCNF£¬ÁíÓеÚËÄ·¶Ê½ºÍµÚÎ巶ʽÁôµ½ÒÔºóÔÙ½éÉÜ¡£ÔÚÄãÉè¼ÆÊý¾Ý¿â֮ʱ£¬ÈôÄÜ·ûºÏÕ⼸¸ö·¶Ê½£¬Äã¾ÍÊÇÊý¾Ý¿âÉè¼ÆµÄ¸ßÊÖ¡£
µÚÒ»·¶Ê½£¨1NF£©£ºÔÚ¹ØÏµÄ£Ê½RÖеÄÿһ¸ö¾ßÌå¹ØÏµrÖУ¬Èç¹ûÿ¸öÊôÐÔÖµ¶¼Ê ......

¾­µäµÄMYSQLÓï¾ä

·Ç³£³£Óõģº¾­µäµÄMYSQLÓï¾ä…… php¿ªÔ´
ÕâÕæÊÇÒ»¸öºÃ¶«Î÷£ºÑ§Ï°ºÃÁ˺ÜÊÜÓõÄŶ……
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(Create£¬Alter£¬Drop£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(Select£¬Delete£¬Update£¬Insert)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)php¿ªÔ´
Ê×ÏÈ,¼òÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ