Skip to content

Instantly share code, notes, and snippets.

@tylerwatt12
Created September 21, 2022 12:57
Show Gist options
  • Save tylerwatt12/a8755a97d834594bcd73052d38936956 to your computer and use it in GitHub Desktop.
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
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