From e23149dccc67407e53efaeaab531961c2b8bc844 Mon Sep 17 00:00:00 2001 From: james Date: Tue, 20 Oct 2009 19:40:55 +0000 Subject: [PATCH] HOpefully fix the 118 update to convert sponsor_contacts to users_sponsor --- db/db.update.118.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db.update.118.php b/db/db.update.118.php index ab019cd..6070c22 100644 --- a/db/db.update.118.php +++ b/db/db.update.118.php @@ -24,10 +24,10 @@ function db_update_118_post() $active="yes"; } //see if a user exists with this email - $uq=mysql_query("SELECT * FROM users WHERE username='".mysql_real_escape_string($r->email)."' AND year='$r->year'"); + $uq=mysql_query("SELECT * FROM users WHERE (username='".mysql_real_escape_string($r->email)."' OR email='".mysql_real_escape_string($r->email)."') ORDER BY year DESC LIMIT 1"); // AND year='$r->year'"); if($r->email && $ur=mysql_fetch_object($uq)) { $user_id=$ur->id; - echo "Using existing users.id=$user_id for award_contacts.id=$r->id because email address/year ($r->email/$r->year) matches\n"; + echo "Using existing users.id=$user_id for award_contacts.id=$r->id because email address ($r->email) matches\n"; //update any info we have thats missing $sqlset="";