Total Users Online: 167 üye, 2 guest | Tarih/Saat: 2024-03-29 05:29
 
Tüm Özel Mesajları Silme
2011-11-13 23:54 GMT  Çoklu Alıntı
Kaan

User is: Online status   Gender_M
Posts: 2772
Ülke: İstanbul - 34
Meslek: Serbest Meslek
Age: 41

Clean the private messages

On popular sites the count of private messages can go high, it's often the second biggest SQL table after the posts in forums. So to ...

- Delete ALL the PM older than 1 year (including the archives).
- Delete the PM older than 6 month and not archived (yet read and still in the inbox).
- Delete the PM older than 3 month and not read by the recipient.

Run this with phpMyAdmin, tab "SQL" :

MYSQL:
DELETE FROM sed_pm WHERE pm_date < UNIX_TIMESTAMP(NOW()) - 86400 * 365;
DELETE FROM sed_pm WHERE pm_date < UNIX_TIMESTAMP(NOW()) - 86400 * 180 AND pm_state=1;
DELETE FROM sed_pm WHERE pm_date < UNIX_TIMESTAMP(NOW()) - 86400 * 90 AND pm_state=0;
OPTIMIZE TABLE sed_pm;


1. 365 günden eski Arşivlenmiş özel mesajları silme
2. 180 günden eski Okunmuş ve arşivlenmiş özel mesajları silme
3. 90 günden eski okunmamış özel mesajları silme

Kodları ister tek tek isterseniz hepsini birlikte phpmyadmin sayfanızdan import ediniz.
Konuyla İlgili Diğer Başlıklar
Ramazan Bayramı Mesajları Kısa Mesajlar
Youtube'dan Ramazan'a özel hazırlık!
Onay sırasındaki sayfaların tümünü silme işlemi
Toplu Üye Silme
Seditio Özel Bir Tema (Satlık)
Emlak, Oto Galeri, Rent A Car, Şiir, Edebiyat Script Siparişlerinizi Verebilirsiniz.
Detaylar İçin: kaan@ntka.org

Seditio 170 İndir
Capte Müzik İndir
Seditio Toolbar İndir

 

Powered by Seditio © 2009-2012 All Rights Reserved