Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Would this work?

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Barrucadu

Established Member
Impact
64
What this script is supposed to do is delete all articles older than 60 days, would it work?

PHP:
$killdate = date("d-m-Y")-60;
mysql_connect("---Server---","---Username---","---Password---") or die(mysql_error());
mysql_select_db("---Database---") or die(mysql_error());
mysql_query("DELETE FROM `MyPhpArticle` WHERE `date` <= ".$killdate."") or die(mysql_error());
mysql_close();
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
It should work. Just for your information, it will delete any column created 60 days old, irrespective of posts, settings or other data, so when you replace "MyPhpArticle" variable with the table you want to clean up, make sure it has nothing else except post data.
I would recommend that you play with it little bit on dummy databases before actually putting it to any use.
 
0
•••
So it'll delete all entries in the database older than 60 days?
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back