forked from science-ation/science-ation
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:
parent
f56d8f576c
commit
a6f0d88df7
@ -1 +1 @@
|
|||||||
173
|
174
|
||||||
|
11
db/db.update.174.php
Normal file
11
db/db.update.174.php
Normal 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']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
Loading…
Reference in New Issue
Block a user