rubyan/simple-oracle

使用 OCI8 连接到 Oracle 数据库的简单类

dev-master 2016-07-07 15:15 UTC

This package is auto-updated.

Last update: 2024-09-18 23:01:23 UTC


README

这是使用 OCI8 连接到 Oracle 数据库的一个非常轻量级的解决方案。

通过 composer 安装

composer require rubyan/simple-oracle:dev-master

CakePHP 3 中的示例使用

    $config['host'] = 'localhost';
    $config['username'] = 'demo';
    $config['password'] = 'demo';
    $config['port'] = 1521;
    $config['instance_name'] = 'xe';
    $config['charset'] = 'UTF8';

    $db = new \Rubyan\Oracle\Oracle($config);   
    $sql = 'SELECT * FROM HR.JOBS';
    $db->execute($sql);