Created
September 21, 2022 12:57
-
-
Save tylerwatt12/a8755a97d834594bcd73052d38936956 to your computer and use it in GitHub Desktop.
ODBC connection to MAS90/ProvideX using PHP PDO_ODBC driver and Medoo Framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include 'lib/Medoo.php'; //Call database library | |
use Medoo\Medoo; //This line needs added on any php page a database call is made (should only be functions.php) | |
//phpinfo(); | |
$database = new Medoo([ | |
'dsn' => [ | |
// The PDO driver name for the DSN driver parameter. | |
'driver' => 'odbc', | |
// The parameters with key and value for DSN. | |
'DSN' => 'MASABC64' | |
], | |
// [optional] Medoo will have a different handle method according to different database types. | |
'type' => 'odbc', | |
'database_name' => '' | |
]); | |
$data = $database->select("CI_Item", "*"); | |
d($data); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment