

![]() |
| | Thread Tools | Display Modes |
| |||
|
I want to delete the old posts from the database, is there any inside the pligg to do it. I want to utilize my database space to the maximum
|
| |||
| |||
|
Thanks Can you please throw more light on this code, You mean i have to save this in a separate file or i have to incorporate this below code. And more im little bit confused on the numbers 1209600 and 7776000 plz explain thanks once again. <?php mysql_connect("dbhost", "dbname", "dbpass") or die("error1"); mysql_select_db("dbname") or die("error2"); $fourteen_days = 1209600; $now = date("U") - $fourteen_days; $ninety_days = 7776000; $now2 = date("U") - $ninety_days; $now = date("Y-m-d H:i:s",$now); $now2 = date("Y-m-d H:i:s",$now2); mysql_query("delete from links where link_date < '$now' AND link_status = 'queued'"); mysql_query("delete from links where link_date < '$now2' AND link_status = 'published'"); mysql_query("delete from links where link_status = 'discard'"); ?> |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Delete users from database and admin user management | bbrian017 | Questions and Comments | 18 | 02-22-2011 12:51 AM |
| Warning: Error establishing mySQL database connection. - Errors on all pages - HELP! | comptalk | Questions and Comments | 3 | 04-21-2009 12:44 PM |
| Delete old story's (not discard) but out of database etc. | Fred007 | Questions and Comments | 5 | 01-28-2009 08:46 AM |
| how to delete links from database? | ivytony | Questions and Comments | 1 | 02-16-2008 01:15 AM |
| As a "god" user, can I delete a post? | jmruas | Questions and Comments | 9 | 09-27-2007 07:38 PM |