Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
Is there an admin script for this? Or do I have to take the old, 6.44 one?

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Dont' think it's a function anymore. So you'd have to do a query or hack the old script.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
You could write a query and save it in your SQL Commands selection that deletes everything NOW minus whatever time you set.

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
Strange, isn't it? Do you think I should open a support ticket and issue a bug report at Infopop?

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
I don't see what the bug would be. It was a feature that was removed, but can easily be accomplished by one SQL command.

Infopop removed the "catchall" feature and implemented a "quota" feature that forces forum members to police themselves. All in all I think it is a better idea, I just think they should have fleshed out the Private Message area better, showing what the limits are, how close you are to your limit, etc.

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
>I don't see what the bug would be.
The bug is that they forgot to include the script from the last version.
Usually, the newer version has more features and options instead of less.

Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
Joined: Nov 2001
Posts: 134
Its a shame this was taken out, but i guess once its cleared down it works well...

So heres the code..

$query = "
SELECT COUNT(*) FROM {$config['tbprefix']}Messages
WHERE M_Sent <= $purge
";
$sth = $dbh -> do_query($query);
list($deleted) = $dbh ->fetch_array($sth);
if ($deleted < 1) { $deleted = 0; }

$query = "
DELETE FROM {$config['tbprefix']}Messages
WHERE M_Sent <= $purge
";
$dbh -> do_query($query);


So if I wanted to delete a load of messages older than 90 days what would the syntax be?

Whos the SQL experts thank you

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
DELETE FROM `w3t_Messages`
WHERE `M_Sent` < (UNIX_TIMESTAMP( NOW() ) - 90 * 24 * 60 * 60)

Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
Joined: Nov 2001
Posts: 134
Cheers! A star.

Joined: Dec 2004
Posts: 34
User
User
Offline
Joined: Dec 2004
Posts: 34
[]Anno said:
DELETE FROM `w3t_Messages`
WHERE `M_Sent` < (UNIX_TIMESTAMP( NOW() ) - 90 * 24 * 60 * 60) [/]

Do we just change the "90" to change the number of days?

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
yes


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)