]> SAFE projects GIT repository - jmp/mailleur/commitdiff
devsql.php start to work
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 27 Aug 2025 18:31:37 +0000 (14:31 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 27 Aug 2025 18:31:37 +0000 (14:31 -0400)
www/devsql.php

index 859ecd1b6d38fe567490cce69da39e5f59220416..6ee8edbec60931cd6af356888c0fe4d61c8493d2 100644 (file)
@@ -8,20 +8,22 @@
 function sql_connect() 
 
 {
+$dbtype=getenv("DB_TYPE");
 switch($dbtype) {
   case 'MYSQL'         :
     include_once "unimar.php";
-    echo ("unimar.php included");
+    $STR="unimar.php included";
     break;
   case 'POSTGRESQL'    :
     include_once "unipos.php";
-    echo ("unipos.php included");
+    $STR="unipos.php included";
     break;
   default              :
-    $daterr="Database type <".$dbtype."> is unexpected!"
+    $daterr="Database type <".$dbtype."> is unexpected!";
     throw new ErrorException($daterr);
     break;
   }
+return $STR;
 }
 
 ?>