From: Jean-Marc Pigeon (Delson) Date: Thu, 28 Aug 2025 17:19:07 +0000 (-0400) Subject: Trying to close sql mysql X-Git-Tag: end-0.15~54 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=0b7ec603cdf2d1aca54038e114edb1afdb7f4dd6;p=jmp%2Fmailleur Trying to close sql mysql --- 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; +} ?>