Stop script processing upon mysql error. Based on a patch by Alexander Sornes.
This commit is contained in:
@@ -12,6 +12,8 @@ function query_appdb($sQuery, $sComment="")
|
|||||||
{
|
{
|
||||||
// The last argument makes sure we are really opening a new connection
|
// 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);
|
||||||
|
if(!$hAppdbLink)
|
||||||
|
die("Database error, please try again soon.");
|
||||||
mysql_select_db(APPS_DB, $hAppdbLink);
|
mysql_select_db(APPS_DB, $hAppdbLink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user