Discussion:
Using CodeIgniter with Informix
(too old to reply)
doctor
2011-08-06 13:24:19 UTC
Permalink
Raw Message
Anyone has successfully using CodeIgniter with Informix ?
d***@gmail.com
2014-10-14 16:03:54 UTC
Permalink
Raw Message
mmmmmm........ pregunta ya te an solucionado la pregunta?

Yo poseo problemas con esa coneccion.
s***@terato.com
2016-03-22 03:04:59 UTC
Permalink
Raw Message
Post by doctor
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();
s***@terato.com
2016-03-22 03:12:35 UTC
Permalink
Raw Message
And make sure you have PDO and pdo_informix module installed in PHP.
Post by s***@terato.com
Post by doctor
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();
Loading...