forked from science-ation/science-ation
15 lines
463 B
PHP
15 lines
463 B
PHP
<?
|
|
function db_update_174_post()
|
|
{
|
|
global $config;
|
|
|
|
$q = $pdo->prepare("SELECT * FROM users WHERE deleted = 'yes'");
|
|
while($row = $q->fetch(PDO::FETCH_ASSOC)){
|
|
echo "Flagging user records prior to " . $row['year'] . " for user " . $row['uid'] . " as deleted - ";
|
|
$stmt = $pdo->prepare("UPDATE users SET deleted = 'yes' WHERE uid = " . $row['uid'] . " AND year < " . $row['year']);
|
|
$stmt->execute();
|
|
echo $pdo->rowCount() . " rows affected.\n";
|
|
}
|
|
}
|
|
?>
|