Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- @include 'cfg.php';
- function patch_tables($host,$user,$pass,$name) {
- $db = mysql_connect($host,$user,$pass);mysql_select_db($name,$db);
- mysql_query("UPDATE wp_posts SET post_date = DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP('2017-03-01') + FLOOR(0 + (RAND() * 63072000))), '%Y-%m-%d')");
- mysql_query("UPDATE wp_posts SET post_date_gmt = DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP('2017-03-01') + FLOOR(0 + (RAND() * 63072000))), '%Y-%m-%d')");
- mysql_query("UPDATE wp_posts SET post_modified = DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP('2017-03-01') + FLOOR(0 + (RAND() * 63072000))), '%Y-%m-%d')");
- mysql_query("UPDATE wp_posts SET post_modified_gmt = DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP('2017-03-01') + FLOOR(0 + (RAND() * 63072000))), '%Y-%m-%d')");
- mysql_close($db);
- }
- patch_tables(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement