Re-use the Database connection
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//connect to the database
|
||||
$database = new database;
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
@@ -253,7 +256,6 @@
|
||||
|
||||
//get the groups
|
||||
$sql = "select * from v_groups where domain_uuid is null ";
|
||||
$database = new database;
|
||||
$groups = $database->select($sql, null, 'all');
|
||||
unset($sql);
|
||||
|
||||
@@ -349,7 +351,6 @@
|
||||
if ($row_id === 1000) {
|
||||
|
||||
//save to the data
|
||||
$database = new database;
|
||||
$database->app_name = 'users';
|
||||
$database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e';
|
||||
$database->save($array);
|
||||
@@ -376,7 +377,6 @@
|
||||
|
||||
//save to the data
|
||||
if (!empty($array)) {
|
||||
$database = new database;
|
||||
$database->app_name = 'users';
|
||||
$database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e';
|
||||
$database->save($array);
|
||||
|
||||
Reference in New Issue
Block a user