summaryrefslogtreecommitdiffstats
path: root/include/db.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2009-04-24 22:27:26 -0700
committerArun Persaud <arun@nubati.net>2009-04-24 22:27:26 -0700
commit4cbc3848a891ac9addf10264d24a9f4273c5e355 (patch)
treea878a975a409aa1bc6ce8c83d6e93f8c34bf982d /include/db.php
parentcdf3b418ca71babb4336243ccdd741bbd5970d4d (diff)
downloade-DoKo-4cbc3848a891ac9addf10264d24a9f4273c5e355.tar.gz
e-DoKo-4cbc3848a891ac9addf10264d24a9f4273c5e355.tar.bz2
e-DoKo-4cbc3848a891ac9addf10264d24a9f4273c5e355.zip
CLEANUP: cleaned up some debug message and error checking
Diffstat (limited to 'include/db.php')
-rw-r--r--include/db.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/db.php b/include/db.php
index e389db4..3d9d98c 100644
--- a/include/db.php
+++ b/include/db.php
@@ -18,8 +18,10 @@ function DB_open()
mysql_select_db($DB_database) or die('Could not select database');
}
else
- return -1;
-
+ {
+ echo mysql_errno() . ": " . mysql_error(). "\n";
+ return -1;
+ }
return 0;
}
@@ -1036,7 +1038,7 @@ function DB_get_userid($type,$var1="",$var2="")
/* test if a recovery password has been set */
if(!$r)
{
- echo "testing alternative password";
+ /* testing alternative password */
$result = DB_query("SELECT User.id FROM User".
" LEFT JOIN Recovery ON User.id=Recovery.user_id".
" WHERE email=".DB_quote_smart($var1).