Added a db update that finds all user records that are marked as deleted and marks all preceding records for the same user as deleted as well.

This commit is contained in:
jacob 2012-03-05 19:13:08 +00:00
parent f56d8f576c
commit a6f0d88df7
2 changed files with 12 additions and 1 deletions

View File

@ -1 +1 @@
173 174

11
db/db.update.174.php Normal file
View File

@ -0,0 +1,11 @@
<?
function db_update_174_post()
{
global $config;
$q = mysql_query("SELECT * FROM users WHERE deleted = 'yes'");
while($row = mysql_fetch_assoc($q)){
mysql_query("UPDATE users SET deleted = 'yes' WHERE uid = " . $row['uid'] . " AND year < " . $row['year']);
}
}
?>