forked from science-ation/science-ation
A quick update to put more informative output on the db update.
This commit is contained in:
parent
a6f0d88df7
commit
d70f06eeb5
@ -5,7 +5,9 @@ function db_update_174_post()
|
|||||||
|
|
||||||
$q = mysql_query("SELECT * FROM users WHERE deleted = 'yes'");
|
$q = mysql_query("SELECT * FROM users WHERE deleted = 'yes'");
|
||||||
while($row = mysql_fetch_assoc($q)){
|
while($row = mysql_fetch_assoc($q)){
|
||||||
|
echo "Flagging user records prior to " . $row['year'] . " for user " . $row['uid'] . " as deleted - ";
|
||||||
mysql_query("UPDATE users SET deleted = 'yes' WHERE uid = " . $row['uid'] . " AND year < " . $row['year']);
|
mysql_query("UPDATE users SET deleted = 'yes' WHERE uid = " . $row['uid'] . " AND year < " . $row['year']);
|
||||||
|
echo mysql_affected_rows() . " rows affected.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user