moses toh moses toh - 1 year ago 92
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


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.