2012-03-05 19:13:08 +00:00
|
|
|
<?
|
|
|
|
function db_update_174_post()
|
|
|
|
{
|
|
|
|
global $config;
|
|
|
|
|
2024-12-12 21:24:45 +00:00
|
|
|
$q = $pdo->prepare("SELECT * FROM users WHERE deleted = 'yes'");
|
|
|
|
while($row = $q->fetch(PDO::FETCH_ASSOC)){
|
2012-03-05 19:57:59 +00:00
|
|
|
echo "Flagging user records prior to " . $row['year'] . " for user " . $row['uid'] . " as deleted - ";
|
2024-12-12 21:24:45 +00:00
|
|
|
$stmt = $pdo->prepare("UPDATE users SET deleted = 'yes' WHERE uid = " . $row['uid'] . " AND year < " . $row['year']);
|
|
|
|
$stmt->execute();
|
|
|
|
echo $pdo->rowCount() . " rows affected.\n";
|
2012-03-05 19:13:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|