science-ation/db/db.update.81.php
2024-12-10 19:40:23 -05:00

14 lines
343 B
PHP

<?
function db_update_81_post()
{
$q = $pdo->prepare("SELECT DISTINCT award_sponsors_id FROM award_contacts");
$q->execute();
while($i = m$q->fetch(PDO::FETCH_OBJ)) {
$asid = $i->award_sponsors_id;
$stmt = $pdo->prepare("UPDATE award_contacts SET `primary`='yes' WHERE award_sponsors_id='$asid' LIMIT 1");
$stmt->execute();
}
}
?>