NameSilo

Would this work?

Namecheap AuctionsNamecheap Auctions
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
Close
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
Close
So it'll delete all entries in the database older than 60 days?
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Member card: see how many threads a member started
The member card now shows a Threads number, right after Posts. The member card is the box that opens when you point at a name. Profile...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back