ÔÎĵØÖ·£ºhttp://www.cnblogs.com/hejiaquan/archive/2012/04/07/2435817.html
Õ¾ÄÚÐÅ·ÖΪ¡°µãµ½µã¡±ºÍ¡°µãµ½Ã桱£¬¡°µãµ½µã¡±ÊôÓÚ˽ÐÅ£¬Óû§Ö®¼ä´«µÝµÄÐÅÏ¢£¬Ò»¶ÔÒ»´«µÝ¡£¡°µãµ½Ã桱£¬ÊôÓÚϵͳÏûÏ¢»òÕß¹«¹²ÐÅÏ¢£¬ÊôÓÚÒ»¶Ô¶à·¢ËÍ¡£
Õ¾ÄÚÐŵÄÉè¼Æ¼ÈÒª¿¼Âǵ½Í¶µÝµÄ׼ȷÐÔ£¨Ò²¾ÍÊǸÃÊÕµ½µÄÈËÄÜÊÕµ½ÐÅÏ¢£©£¬Ò²Òª¿¼ÂÇÐÅÏ¢³Ö¾Ã»¯´æ´¢¿Õ¼äÕ¼ÓÃÎÊÌ⣬ÔÚËûµÄµÚһƪ²©ÎÄÖÐÏêϸ½øÐÐÁ˽éÉÜ¡£
ÎÒÃÇÔڴ˽ö°ÑµÚÈýÖÖÇé¿öÄóöÀ´ËµÃ÷£¬Ò²¾ÍÊÇÓû§Á¿Îª°ÙÍò¼¶£¬»îÔ¾Óû§Ö»Õ¼ÆäÖеÄÒ»²¿·Ö¡£
1
2
3
4
5
|
Êý¾Ý¿âµÄÉè¼Æ£º ±íÃû£ºMessage ID£º±àºÅ£»SendID£º·¢ËÍÕß±àºÅ£»RecID£º½ÓÊÜÕß±àºÅ£¨ÈçΪ0£¬Ôò½ÓÊÜÕßΪËùÓÐÈË£©£»MessageID£ºÕ¾ÄÚÐűàºÅ£»Statue£ºÕ¾ÄÚÐŵIJ鿴״̬£» ±íÃû£ºMessageText ID£º±àºÅ£»Message£ºÕ¾ÄÚÐŵÄÄÚÈÝ£»PDate£ºÕ¾ÄÚÐÅ·¢ËÍʱ¼ä£» |
½«Ò»·âMessage·ÖΪÁ½²¿·Ö£¬Ò»ÊÇ´æ´¢ÄÚÈÝ£¬ÁíÒ»¸öÊÇ´æ´¢Óû§µÄ²é¿´×´Ì¬¡£Ò²¾Í½â¾öÁ˹ØÓÚȺ·¢ÐÅÏ¢µÄ´æ´¢¿Õ¼äÕ¼ÓÃÎÊÌ⣬²»ÐèҪΪÿ¸öÓû§²åÈëÏà¹ØÊý¾Ý¡£
Áí Í⿼Âǵ½°ÙÍò¼¶Óû§Á¿£¬»îÔ¾Óû§Ö»Õ¼ÆäÖеÄÒ»²¿·Ö£¬²»¿ÉÄÜÔÚ·¢ËÍÒ»·âϵͳÏûϢʱ£¬ÔÚMessage±íÖÐΪÿһ¸öÓû§²åÈëÒ»Ìõ״̬£¨±ê¼ÇΪδ¶Á£©£¬Èç¹ûÒ»°Ù ÍòÓû§£¬ÄÇô·¢ËÍÒ»ÌõÏûÏ¢£¬¾ÍµÃÍùMessage±íÖвåÈëÒ»°ÙÍòÌõ±ê¼Ç״̬µÄÊý¾Ý£¬ÏÔÈ»²»¾ßÓпÉÐÐÐÔ¡£ËùÒÔÍò²ÖÒ»ÊòÌá³ö»»ÏÂ˼·£º
ÔÚÓû§µÇ¼ʱ¼ìË÷MessageºÍMessgaeText,½«MessgaeTextµÄID ºÍMessgae µÄMessageID ÏàÆ¥Å䣬 ÕâÑù¾ÍÓÐÁ½ÖÖÇé¿ö£º
Ò»¡¢Ã»ÓÐÕÒµ½ RecID= ×Ô¼ºID ²¢ÇÒMessageTextÖеÄÏûÏ¢ID²»°üº¬ÔÚMessgaeµÄMessageIDÖÐ
½«´Ë²¿·ÖÏûϢȡ³öÀ´£¬ÏÔʾΪ¸ÃÓû§Î´¶Á£¬ÔÚÓû§µã»÷ÔĶÁµÄʱºò£¬½«ÏûÏ¢ÔĶÁ״̬дÈëMessgae±í£¬Status=ÒѶÁ¡£
¶þ¡¢ÕÒµ½RecID=×Ô¼º ²¢ÇÒ MessageTextÖеÄÏûÏ¢ID°üº¬ÔÚMessgaeµÄMessageIDÖУ¬Status±ê¼ÇΪÒѶÁ
½«´Ë²¿·ÖÏûÏ¢ÌáÇ°³öÀ´£¬ÏÔʾΪÓû§ÒѶÁ£¬Èç¹ûÏ롰ɾ³ý¡±£¨µ±È»ÊÇÂß¼ÉϵÄɾ³ý£¬²¢·ÇÎïÀíÊý¾Ý¿âɾ³ý£©£¬ÉèÖøÃStatus=ɾ³ý¡£
¶ÔÓÚÉÏÃæµÄÉè¼Æ·½°¸£¬Éè¼ÆϵͳÏûϢȺ·¢È«²¿Óû§£¬ÊǺÜÊʺϵġ£µ«ÊÇÊÜÖÚÃæԽС£¨¼´¡°µãµ½Ã桱µÄÃæԽС£©£¬¾Í²»Ì«ºÏÊÊ£¬ËùÒÔÎÒÃÇÐèÒªÔÚ´ËÉè¼Æ·½°¸ÉϽøÐÐÀ©Õ¹¡£
Ö»¶ÔÉÏÃæÌáµ½µÄÓû§°ÙÍò¼¶ÇÒ»îÔ¾Óû§Ö»Õ¼Ò»²¿·ÖÕâÖÖÇé¿ö̽ÌÖ¡£»¹ÊDzÉÓý«ÏûÏ¢ÄÚÈݺÍÔĶÁ״̬·Ö¿ªÉè¼Æ¡£
ÎÒÃǽ«µãµ½µãºÍµãµ½Ãæ×ۺϵ½Ò»Æð¿¼ÂÇ£¬²¢ÇÒ¾«Ï¸»¯Õâ¸ö¡°Ã桱£¬²»ÔÙÊÇÁýͳµÄÈ«²¿Óû§¡£¡°Ã桱¿ÉÒÔÊǾßÓÐijһ½ÇÉ«µÄÓû§¡¢Ä³Ò»Óû§×éµÄÓû§ÉõÖÁһЩ²»¾ßÓÐÈκι«¹²ÌØÕ÷µÄÉ¢ÁÐÓû§¡£
Éè¼Æ˼·
¸ÅÊöÈçÏ£ºÎÒÃǽ«ÏûÏ¢·ÖΪ˽ÐÅ(Private)¡¢¹«¹²ÏûÏ¢(Public)¡¢ÏµÍ³ÏûÏ¢(Global)£¨»òÕß½«¹«¹²ÏûÏ¢ºÍϵͳÏûÏ¢ºÏ²¢Îª¹«¹²ÏûÏ¢Ò²¿ÉÒÔ£©£¬ÊÓÇé¿ö¶ø¶¨¡£
µãµ½µã£ºÒ»¶ÔÒ»·¢ËÍ£¬ÊôÓÚ˽ÐÅPrivate
µãµ½¸ö±ð£º£¨½ÓÊÕÃæΪ°ÙλÓû§£©Ò»¶Ô¶à£¨¼¸°Ù£©·¢ËÍ£¬²ÉÓÃ˽ÐÅ·½Ê½£¨Private£©
µãµ½¾Ö²¿£º£¨½ÓÊÕÃæΪ¾ßÓÐijЩ¹«¹²ÌØÕ÷ÈçÓû§×é¡¢Óû§½ÇÉ«£©£¬ÊôÓÚ¹«¹²ÏûÏ¢£¨Public£©
µãµ½È«²¿£ºÒ»¶ÔÈ«²¿·¢ËÍ£¬ÊôÓÚϵͳÏûÏ¢£¨Global£©
Êý¾Ý¿âÉè¼Æ
±íÃû£ºMessage
ID£º±àºÅ£»RecID£º½ÓÊÕÕß±àºÅ;MessageID£ºÕ¾ÄÚÐűàºÅ£»Statue£ºÕ¾ÄÚÐŵIJ鿴״̬
±íÃû£ºMessageText
ID£º±àºÅ£»SendID£º·¢ËÍÕß±àºÅ£»Message£ºÕ¾ÄÚÐŵÄÄÚÈÝ£»Type:ÐÅÏ¢ÀàÐÍ£»Group:Óû§×éID; PostDate£ºÕ¾ÄÚÐÅ·¢ËÍʱ¼ä
ÆäÖÐStatus״̬ÓÐδ¶Á¡¢ÒѶÁ¡¢É¾³ý
TypeÀàÐÍÓÐPrivate(˽ÐÅ)¡¢Public(¹«¹²ÏûÏ¢)¡¢Global(ϵͳÏûÏ¢)
µÚÒ»ÖÖ µãµ½µã
µãµ½µã·¢ËÍÊôÓÚ˽ÐÅ£¬±ÈÈçAÓû§·¢Ë͸øBÓû§£¬Ê×ÏÈÔÚMessageText±íÖвåÈëÏûÏ¢ÄÚÈݲ¢ÇÒÉèÖÃType=Private,ͬʱÔÚMessage±íÖвåÈëÒ»Ìõ¼Ç¼ÉèÖÃRecID=B£¬Status=δ¶Á
Óû§B²éÕÒRecID=B,²¢ÇÒStausΪδ¶Á£¬Type=Private,ÏÔʾΪ˽ÐÅδ¶Á£¬µã»÷ÔĶÁºó¸Ä±äStatus=ÒѶÁ
Óû§B²éÕÒRecID=B,²¢ÇÒStausΪÒѶÁ£¬Type=Private,ÏÔʾΪ˽ÐÅÒѶÁ£¬É¾³ýÉèÖÃStatus=ɾ³ý
µÚ¶þÖÖ µãµ½¸ö±ð
²ÉÓúÍ˽ÐÅÏàͬµÄ·½Ê½£¬ÔÚ·¢ËÍÒ»ÌõÏûϢʱÔÚMessageText±íÖвåÈëÏûÏ¢ÄÚÈݲ¢ÇÒÉèÖÃType=Private,ͬʱÔÚMessage±íÖвåÈë¶àÌõ¼Ç¼ÉèÖÃRecID=¸÷½ÓÊÕÕßID£¬Status=δ¶Á
ÿ¸ö½ÓÊÕ²ÉÓúÍ˽ÐÅÒ»ÑùµÄ·½Ê½¶ÁÈ¡´¦Àí¡£
µÚÈýÖÖ µãµ½¾Ö²¿
µãµ½¾Ö²¿ÊÇÒ»¶Ôij½ÇÉ«»òijÓû§×é·¢ËÍ£¬ÀýÈç¹ÜÀíÔ±ÏòÆÕͨÓû§×é·¢ËÍ£¬ÔÚMessageText±í²åÈëÏûÏ¢ÄÚÈÝ£¬ÇÒÉèÖÃType=Public ºÍGroupΪÓû§×éID
Óû§µÇ¼ºó·ÖÁ½ÖÖÇé¿ö£º
1¡¢Î´ÕÒµ½RecId=×Ô¼ºID ÇÒ MessageTextÖУ¨Type=Public ºÍGroup=×Ô¼ºËùÔÚ×é £© µÄÏûÏ¢ID²»°üº¬ÔÚMessgaeµÄMessageIDÖÐ
ÌáÈ¡³öÀ´ÏÔʾΪÓû§¹«¹²ÏûϢδ¶Á£¬ÔÚÓû§µã»÷ÔĶÁµÄʱºò£¬½«ÏûÏ¢ÔĶÁ״̬дÈëMessgae±í£¬Status=ÒѶÁ¡£
2¡¢ÕÒµ½RecId=×Ô¼ºID ÇÒ MessageTextÖУ¨Type=Public ºÍGroup=×Ô¼ºËùÔÚ×é £© µÄÏûÏ¢ID°üº¬ÔÚMessgaeµÄMessageIDÖÐ
½«´Ë²¿·ÖÏûÏ¢ÌáÈ¡³öÀ´£¬ÏÔʾΪÓû§¹«¹²ÏûÏ¢ÒѶÁ£¬Èç¹ûÏ롰ɾ³ý¡±£¨µ±È»ÊÇÂß¼ÉϵÄɾ³ý£¬²¢·ÇÎïÀíÊý¾Ý¿âɾ³ý£©£¬ÉèÖøÃStatus=ɾ³ý¡£
×¢£º´Ëʱ¿ÉÒÔ²»ÑéÖ¤Group=×Ô¼ºËùÔÚ×é
µÚËÄÖÖ µãµ½È«²¿
µãµ½È«²¿ºÍµãµ½¾Ö²¿²ÉÓÃÀàËƵĴ¦Àí·½Ê½¡£ÀýÈç¹ÜÀíÔ±ÏòÆÕͨÓû§×é·¢ËÍ£¬ÔÚMessageText±í²åÈëÏûÏ¢ÄÚÈÝ£¬ÇÒÉèÖÃType=Global
Óû§µÇ¼ºó·ÖÁ½ÖÖÇé¿ö£º
1¡¢Î´ÕÒµ½RecId=×Ô¼ºID ÇÒ MessageTextÖУ¨Type=Global £© µÄÏûÏ¢ID²»°üº¬ÔÚMessgaeµÄMessageIDÖÐ
ÌáÈ¡³öÀ´ÏÔʾΪÓû§ÏµÍ³ÏûϢδ¶Á£¬ÔÚÓû§µã»÷ÔĶÁµÄʱºò£¬½«ÏûÏ¢ÔĶÁ״̬дÈëMessgae±í£¬Status=ÒѶÁ¡£
2¡¢ÕÒµ½RecId=×Ô¼ºID ÇÒ MessageTextÖУ¨Type=Global £© µÄÏûÏ¢ID°üº¬ÔÚMessgaeµÄMessageIDÖÐ
½«´Ë²¿·ÖÏûÏ¢ÌáÈ¡³öÀ´£¬ÏÔʾΪÓû§ÏµÍ³ÏûÏ¢ÒѶÁ£¬Èç¹ûÏ롰ɾ³ý¡±£¨Âß¼ÉϵÄɾ³ý£¬²¢·ÇÎïÀíÊý¾Ý¿âɾ³ý£©£¬ÉèÖøÃStatus=ɾ³ý¡£
´¦ÀíÁ÷³Ì
ÎÒÃÇÔÙÀ´¿´ÏÂÕû¸ö´¦ÀíÁ÷³Ì£¬Óû§µÇ¼ºóϵͳÊÇÔõÑùÌáÈ¡ºÍÏÔʾÐÅÏ¢µÄ¡£
Óû§µÇ¼ºó£¬²ÉÓÃAjaxÒì²½¼ÓÔØ¡¢Í³¼ÆÓû§Õ¾ÄÚÐÅ
Messgae±íÖÐRecId=×Ô¼ºID ÇÒStatus=δ¶Á£¬ÏÔʾΪ˽ÐÅδ¶Á
Messgae±íÖÐRecId=×Ô¼ºID ÇÒStatus=ÒѶÁ ÇÒ Type=Private,ÏÔʾΪ˽ÐÅÒѶÁ
Messgae±íÖÐδÕÒµ½RecId=×Ô¼ºID ÇÒ MessageTextÖУ¨Type=Public ºÍGroup=×Ô¼ºËùÔÚ×é £© µÄÏûÏ¢ID²»°üº¬ÔÚMessgaeµÄMessageIDÖУ¬ÏÔʾΪ¹«¹²ÏûϢδ¶Á
Messgae±íÖÐÕÒµ½RecId=×Ô¼ºID ÇÒ MessageTextÖУ¨Type=Public £© µÄÏûÏ¢ID°üº¬ÔÚMessgaeµÄMessageIDÖÐ £¬ÏÔʾΪ¹«¹²ÏûÏ¢ÒѶÁ
Messgae±íÖÐδÕÒµ½RecId=×Ô¼ºID ÇÒ MessageTextÖУ¨Type=Global £© µÄÏûÏ¢ID²»°üº¬ÔÚMessgaeµÄMessageIDÖÐ £¬ÏÔʾΪϵͳÏûϢδ¶Á
Messgae±íÖÐÕÒµ½RecId=×Ô¼ºID ÇÒ MessageTextÖУ¨Type=Global £© µÄÏûÏ¢ID°üº¬ÔÚMessgaeµÄMessageIDÖÐ £¬ÏÔʾΪϵͳÏûÏ¢ÒѶÁ
»ò Ðí£¬´ó¼Ò»áÏëÕâÖÖ·½°¸Í¬ÑùûÓнâ¾öÎïÀíɾ³ýµÄÎÊÌâ»òÕ߸ü¼Ó¾«Ï¸»¯µÄ½ÓÊյġ°Ã桱£¬ÔÚÓû§ÏÔʾÏûϢʱÐèÒªºÜ¶à¸´ÔÓµÄÅжÏÓ°ÏìÓû§ÌåÑéºÍÐÔÄܵȵÈÎÊÌâ¡£ÆäʵÎÒ ÃÇ»¹¿ÉÒÔÉèÖÃÏûÏ¢µÄÓÐЧÆÚ£¬¹ýÆÚµÄÏûÏ¢²»ÏÔʾ¡£»òÕß×Ô¼ºÉè¼ÆÒ»¸öÏûÏ¢Çå³ý»úÖÆ¡£µ±È»£¬ÕâЩ¶¼ÐèÒªÒÔºó½øÒ»²½ÍêÉƺ͸Ľø£¬±¾ÎÄÖÐÔÝʱûÓÐÉæ¼°¡£ÒÔÉÏÖ»ÊDZ¾ÈË ¹ØÓÚÕ¾ÄÚÐŵÄһЩdz±¡Ö®¼û£¬ÄÜÁ¦ÓÐÏÞ±ØÈ»´æÔÚ¸÷ÖÖÎÊÌ⣬¿ÒÇëÔ°Äڵĸ÷λÄÜÌá³öÅúÆÀ¡¢½¨Òé¡£Èç¹ûÄú¾õµÃ±¾ÎĺܺÿÉÒÔ µã»÷ÍƼö£¬Èøü¶àµÄÈ˲ÎÓëÌÖÂÛ¡£ ͬʱÏòÍò²ÖÒ»ÊòÖÂÒÔлÒ⣬¸ÐлËû·ÖÏíÁË×Ô¼ºµÄ±¦¹ó˼Ïë¡£
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ