From a1455b30b67aa67c1b83a827e784952f3393aea8 Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 13 Jul 2010 17:01:50 +0000 Subject: [PATCH] Three small fixes: 1) Needed to include deleted records that were getting omitted 2) typo in debug output 3) "users" records with a year of 0 get deleted after the corresponding "accounts" record is created --- db/db.update.195.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/db/db.update.195.php b/db/db.update.195.php index c9e89080..0aeb6ae8 100644 --- a/db/db.update.195.php +++ b/db/db.update.195.php @@ -23,7 +23,7 @@ function db_update_195_post(){ $uid = $uidDat['uid']; $userQuery = "SELECT users.*, users_committee.access_super AS super FROM users" . " LEFT JOIN users_committee ON users_committee.users_id = users.id" . - " WHERE uid=$uid AND deleted = 'no' ORDER BY year DESC"; + " WHERE uid=$uid ORDER BY year DESC"; $userResults = mysql_query($userQuery); $userRecord = mysql_fetch_assoc($userResults); @@ -149,7 +149,7 @@ function db_update_195_post(){ } }else{ - echo "No conference year specified for user '$userName'\n"; + echo "No conference year specified for user '$username'\n"; } @@ -157,6 +157,9 @@ function db_update_195_post(){ } + // now that the account records have all been created, we can delete any user records that have a year of zero + mysql_query("DELETE FROM users WHERE year = 0"); + mysql_query("COMMIT"); }catch(Exception $e){ mysql_query("ROLLBACK");