Centralize SQL connections
Co-authored-by: LeOSW42 <673670+LeOSW42@users.noreply.github.com>
This commit is contained in:
13
includes/database.php
Normal file
13
includes/database.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
function sql_connect() {
|
||||
global $config;
|
||||
|
||||
return pg_connect(
|
||||
"host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass']
|
||||
) or die ("Could not connect to server\n");
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user