setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $GLOBALS['dbcon']->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); $GLOBALS['dbcon']->setAttribute(PDO::ATTR_PERSISTENT , true); }catch (exception $e) { echo 'We could not connect to the database. Our potatoes are working on it.'; exit; } } public static function closeDatabaseConnection() { if (isset($GLOBALS['dbcon'])) { $GLOBALS['dbcon'] = null; } } } ?>