tbcd / doctrine-hfsql-driver
带有ODBC的Doctrine HFSQL驱动程序
1.0.2
2022-09-21 13:04 UTC
Requires
- php: >=8.0.2
- ext-ctype: *
- ext-iconv: *
- ext-odbc: *
- doctrine/dbal: ^3.0
Requires (Dev)
- doctrine/doctrine-bundle: ^2.2
- phpunit/phpunit: ^9.5
- symfony/finder: ^6.0
This package is auto-updated.
Last update: 2024-09-24 13:12:42 UTC
README
安装
1. 安装doctrine驱动程序
composer require tbcd/doctrine-hfsql-driver
2. 下载并安装ODBC HFSQL驱动程序
您可以在PCSOFT平台上找到该驱动程序。以下是链接: https://pcsoft.fr/st/telec/modules-communs-27/wx27_103n.htm
3. 创建连接
使用DriverManager
$connection = DriverManager::getConnection([
'host' => '127.0.0.1',
'user' => 'foo',
'password' => 'bar',
'port' => 4900,
'dbName' => 'DBHF_CF',
'driverClass' => \TBCD\Doctrine\HFSQLDriver\Driver::class
]);
或使用doctrine捆绑包
doctrine:
dbal:
default_connection: my_connection
connections:
my_connection:
host: '127.0.0.1'
user: 'foo'
password: 'bar'
dbname: 'DBHF_CF'
port: 4900
driver_class: TBCD\Doctrine\HFSQLDriver\Driver