Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Support the DB2 database in Yii Framework
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
CIbmDB2ColumnSchema.php
CIbmDB2CommandBuilder.php
CIbmDB2Connection.php
CIbmDB2Schema.php
CIbmDB2TableSchema.php
README.md

README.md

YiiDB2

Support the DB2 database in Yii Framework

Requirements

  • PHP module pdo_ibm or pdo_odbc;
  • DB2 Client installed

Installation

  • Install yiidb2 extension
  • Extract the release file under protected/extensions
  • In your protected/config/main.php, add the following:
<?php
...
  'components' => array(
  ...
    'db' => array(
      'connectionString' => 'ibm:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=database;HOSTNAME=hostname;PORT=port;PROTOCOL=TCPIP;',
//or//'connectionString' => 'odbc:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=database;HOSTNAME=hostname;PORT=port;PROTOCOL=TCPIP;',
      'username' => 'username',
      'password' => 'password',
      'class' => 'ext.yiidb2.CIbmDB2Connection',
    ),
    ...
  ),
...
Something went wrong with that request. Please try again.