20¸öʵÓõÄWordPress SQL²éѯ(3)
¡¡¡¡µ±Äã·¢ÏֺܶàÀ¬»øÆÀÂÛ¶¼´øÓÐÏàͬµÄURLÁ´½Ó£¬¿ÉÒÔÀûÓÃÏÂÃæµÄ²éѯһ´ÎÐÔɾ³ýÕâЩÆÀÂÛ¡£%±íʾº¬ÓГ%”·ûºÅÄÚ×Ö·û´®µÄËùÓÐURL¶¼½«±»É¾³ý¡£
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º DELETE from wp_comments WHERE comment_author_url LIKE "%nastyspamurl%" ; |
¡¡¡¡Ê¶±ð²¢É¾³ý“X”ÌìÇ°µÄÎÄÕÂ
¡¡¡¡²éÕÒ“X”ÌìÇ°µÄËùÓÐÎÄÕÂ(×¢Òâ°ÑXÌæ»»³ÉÏàÓ¦ÊýÖµ)£º
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£ºSELECT * FROM `wp_posts` WHERE `post_type` = 'post' AND DATEDIFF(NOW(), `post_date`) > X |
¡¡¡¡É¾³ý“X”ÌìÇ°µÄËùÓÐÎÄÕ£º
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£ºDELETE FROM `wp_posts` WHERE `post_type` = 'post' AND DATEDIFF(NOW(), `post_date`) > X |
¡¡¡¡É¾³ý²»ÐèÒªµÄ¶Ì´úÂë
¡¡¡¡µ±Äã¾ö¶¨²»ÔÙʹÓö̴úÂëʱ£¬ËüÃDz»»á×Ô¶¯Ïûʧ¡£Äã¿ÉÒÔÓÃÒ»¸ö¼òµ¥µÄSQL²éѯÃüÁîɾ³ýËùÓв»ÐèÒªµÄ¶Ì´úÂë¡£ °Ñ“tweet”Ìæ»»³ÉÏàÓ¦¶Ì´úÂëÃû³Æ£º
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º UPDATE wp_post SET post_content = replace(post_content, '[tweet]', '' ) ; |
¡¡¡¡½«ÎÄÕÂתΪҳÃæ
¡¡¡¡ÒÀȻֻҪͨ¹ýPHPMyAdminÔËÐÐÒ»¸öSQL²éѯ¾Í¿ÉÒԸ㶨£º
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º UPDATE wp_posts SET post_type = 'page' WHERE post_type = 'post' |
ÍƼöÐÅÏ¢
- ¹¹½¨¸ß¿ÉÓú͵¯ÐÔÉìËõµÄKV´æ´¢ÏµÍ³
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨¶þ£©
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨Ò»£©
- Ðì¹úÏ飺΢²©ÊÇ·ñ»á²ÎÓëÍøÕ¾ÅÅÃû
- ApacheÔÚ±¾µØ½¨Á¢·ºÓòÃûÐéÄâÖ÷»ú¼ò·¨
- ÈçºÎ½øÐÐÍøÕ¾Õï¶Ï ΪÍøÕ¾½øÐÐÆÀ·Ö
- Ò»¸ö³É¹¦µÄÕ¾³¤Ó¦¸Ã¾ß±¸µÄËØÖÊ
- Ò»Ìõ΢²©Òý·¢µÄ·ÖÎö£ºÈçºÎÈÃ΢²©µÃµ½¹ã·º´«²¥
- ÈçºÎÈÃÒ»¸öÍøÕ¾ÓÐÇ¿´óÉúÃüÁ¦
- פ×ãIDCÃż÷³Ö±Ò¹ÛÍû Õ¾³¤Ñ¡¹º¿Õ¼ä³É¡°¼èÄѵľö¶¨¡±£¿
ÈÈÃÅÐÅÏ¢
- 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ÎÞÃÜÂëµÇ¼
ÆÀÂÛ