• Using CodeIgniter with Informix

    From sulaiman@terato.com@21:1/5 to doctor on Mon Mar 21 20:04:59 2016
    On Saturday, August 6, 2011 at 9:24:19 PM UTC+8, doctor wrote:
    Anyone has successfully using CodeIgniter with Informix ?

    Hi, I got it working in CodeIgniter 3, below is my setup in database.php;

    $db['myexport'] = array(
    'dsn' => '',
    'subdriver' => 'informix',
    'hostname' => getenv('MYEXPORT_HOSTNAME'),
    'port' => getenv('MYEXPORT_PORT'),
    'username' => getenv('MYEXPORT_USERNAME'),
    'password' => getenv('MYEXPORT_PASSWORD'),
    'database' => getenv('MYEXPORT_DATABASE'),
    'server' => getenv('MYEXPORT_SERVER'),
    'dbdriver' => 'pdo',
    'db_debug' => TRUE,
    'pconnect' => FALSE,
    'cache_on' => FALSE
    );

    and below is the code sample in model/controller;

    $this->ifx = $this->load->database('myexport', TRUE);
    $sql = 'SELECT cmpy_id FROM company';
    $query = $this->ifx->query($sql);
    return $query->result_array();

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sulaiman@terato.com@21:1/5 to sula...@terato.com on Mon Mar 21 20:12:35 2016
    And make sure you have PDO and pdo_informix module installed in PHP.

    On Tuesday, March 22, 2016 at 11:05:02 AM UTC+8, sula...@terato.com wrote:
    On Saturday, August 6, 2011 at 9:24:19 PM UTC+8, doctor wrote:
    Anyone has successfully using CodeIgniter with Informix ?

    Hi, I got it working in CodeIgniter 3, below is my setup in database.php;

    $db['myexport'] = array(
    'dsn' => '',
    'subdriver' => 'informix',
    'hostname' => getenv('MYEXPORT_HOSTNAME'),
    'port' => getenv('MYEXPORT_PORT'),
    'username' => getenv('MYEXPORT_USERNAME'),
    'password' => getenv('MYEXPORT_PASSWORD'),
    'database' => getenv('MYEXPORT_DATABASE'),
    'server' => getenv('MYEXPORT_SERVER'),
    'dbdriver' => 'pdo',
    'db_debug' => TRUE,
    'pconnect' => FALSE,
    'cache_on' => FALSE
    );

    and below is the code sample in model/controller;

    $this->ifx = $this->load->database('myexport', TRUE);
    $sql = 'SELECT cmpy_id FROM company';
    $query = $this->ifx->query($sql);
    return $query->result_array();

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Onistech Info Systems@21:1/5 to sula...@terato.com on Fri Apr 16 00:46:58 2021
    On Tuesday, March 22, 2016 at 8:42:37 AM UTC+5:30, sula...@terato.com wrote:
    And make sure you have PDO and pdo_informix module installed in PHP.
    On Tuesday, March 22, 2016 at 11:05:02 AM UTC+8, sula...@terato.com wrote:
    On Saturday, August 6, 2011 at 9:24:19 PM UTC+8, doctor wrote:
    Anyone has successfully using CodeIgniter with Informix ?

    Hi, I got it working in CodeIgniter 3, below is my setup in database.php;

    $db['myexport'] = array(
    'dsn' => '',
    'subdriver' => 'informix',
    'hostname' => getenv('MYEXPORT_HOSTNAME'),
    'port' => getenv('MYEXPORT_PORT'),
    'username' => getenv('MYEXPORT_USERNAME'),
    'password' => getenv('MYEXPORT_PASSWORD'),
    'database' => getenv('MYEXPORT_DATABASE'),
    'server' => getenv('MYEXPORT_SERVER'),
    'dbdriver' => 'pdo',
    'db_debug' => TRUE,
    'pconnect' => FALSE,
    'cache_on' => FALSE
    );

    and below is the code sample in model/controller;

    $this->ifx = $this->load->database('myexport', TRUE);
    $sql = 'SELECT cmpy_id FROM company';
    $query = $this->ifx->query($sql);
    return $query->result_array();
    could not find driver

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)