Total Users Online: 0 üye, 53 guest | Tarih/Saat: 2026-04-21 02:17
 
Tüm Özel Mesajları Silme
2011-11-14 01:54 GMT  oklu Alnt
Kaan

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

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" :

:
ysql]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