diff --git a/user_personal.php b/user_personal.php index 8e03b8f..71b34ce 100644 --- a/user_personal.php +++ b/user_personal.php @@ -150,7 +150,7 @@ case 'save': /* Check for an email collision */ $em = mysql_escape_string(stripslashes($_POST['email'])); - $q=mysql_query("SELECT id FROM users WHERE email='$em' AND uid!='{$u['uid']}' AND deleted='no'"); + $q=mysql_query("SELECT *,max(year) FROM users WHERE email='$em' HAVING uid!='{$u['uid']}' AND deleted='no' "); if(mysql_num_rows($q) > 0) { error_("That email address is in use by another user"); echo "email error";