From 3a228f94198c57bb388293da5ea07e1b7505147e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sun, 27 Jan 2008 17:36:26 +0100 Subject: [PATCH] Die if failing to establish a MySQL connection --- include/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/query.php b/include/query.php index a5e7c71..4643621 100644 --- a/include/query.php +++ b/include/query.php @@ -79,7 +79,7 @@ function query_parameters() if(!is_resource($hAppdbLink)) { // The last argument makes sure we are really opening a new connection - $hAppdbLink = mysql_connect(APPS_DBHOST, APPS_DBUSER, APPS_DBPASS, true); + $hAppdbLink = mysql_connect(APPS_DBHOST, APPS_DBUSER, APPS_DBPASS, true) or die('Database error, please try again soon: '.mysql_error()); mysql_select_db(APPS_DB, $hAppdbLink); }