From 42aae8a38789ec102478db6dc58795c4b095546e Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sun, 6 Apr 2008 22:25:44 -0700 Subject: CLEANUP: started some database cleanup and added some more comments instead of having a different function for each possible way to query for example the full name of a player, there is now only one function with a switch statement that handles the different cases. Still not 100% perfect, but I think nicer to read than before. Signed-off-by: Arun Persaud --- stats.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stats.php') diff --git a/stats.php b/stats.php index efd2c21..ec1d9b7 100644 --- a/stats.php +++ b/stats.php @@ -35,7 +35,7 @@ if(myisset("logout")) else if( isset($_SESSION["name"]) ) { $name = $_SESSION["name"]; - $email = DB_get_email_by_name($name); + $email = DB_get_email('name',$name); $password = DB_get_passwd_by_name($name); /* verify password and email */ @@ -43,7 +43,7 @@ else if( isset($_SESSION["name"]) ) $password = md5($password); $ok = 1; - $myid = DB_get_userid_by_email_and_password($email,$password); + $myid = DB_get_userid('email-password',$email,$password); if(!$myid) $ok = 0; -- cgit v1.2.3-18-g5258