moses toh moses toh - 2 years ago 137
PHP Question

How to run pure php in codeigniter?

My code is like this :

It's pure php. I take the data from PostgreSQL database. Then I insert data into MySQL database

I want run the script in codeigniter

Whether it can be done?

Thank you

Answer Source

You have 3 options

One, pase it in a function with the parameter you want or create a library and call it from a method with the parameters.

Or you can use multiple db, one for mysql and ohter to postgre

$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbdriver'] = 'pdo';

In CI you can do wherever you want in pure PHP.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download