From 0b7ec603cdf2d1aca54038e114edb1afdb7f4dd6 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Thu, 28 Aug 2025 13:19:07 -0400 Subject: [PATCH] Trying to close sql mysql --- www/devsql.php | 20 ++++++++++++++++---- www/mailleur.php | 2 ++ www/unimar.php | 6 ++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/www/devsql.php b/www/devsql.php index 6ee8edb..e219c85 100644 --- a/www/devsql.php +++ b/www/devsql.php @@ -12,18 +12,30 @@ $dbtype=getenv("DB_TYPE"); switch($dbtype) { case 'MYSQL' : include_once "unimar.php"; - $STR="unimar.php included"; break; case 'POSTGRESQL' : include_once "unipos.php"; - $STR="unipos.php included"; break; default : - $daterr="Database type <".$dbtype."> is unexpected!"; + $daterr="Connect Database, type <".$dbtype."> is unexpected!"; throw new ErrorException($daterr); break; } -return $STR; } +function sql_close() + +{ +$dbtype=getenv("DB_TYPE"); +switch($dbtype) { + case 'MYSQL' : + break; + case 'POSTGRESQL' : + break; + default : + $daterr="Close Database, type <".$dbtype."> is unexpected!"; + throw new ErrorException($daterr); + break; + } +} ?> diff --git a/www/mailleur.php b/www/mailleur.php index d0fef76..cce0974 100644 --- a/www/mailleur.php +++ b/www/mailleur.php @@ -11,6 +11,7 @@ $footer=footer("mailleur"); $dbtype=getenv("DB_TYPE"); $dbport=getenv("DB_PORT"); $mode=sql_connect(); +$ferme=sql_close(); $STR = << $footer +$ferme EOT; diff --git a/www/unimar.php b/www/unimar.php index 144a44e..7efdc23 100644 --- a/www/unimar.php +++ b/www/unimar.php @@ -5,5 +5,11 @@ // //============================================================== +mar_close() +{ +$STR="unimar.php, mar_close\n"; + +return $STR; +} ?> -- 2.47.3