CI 1.6.1, Database Class, Manually Connecting, Passing an array of values |
[eluser]Unknown[/eluser]
Hi everyone. I was trying to connect manually to a database by passing an array of values, with the database configuration. Example: Code: $config['hostname'] = "//solap/oracle"; This kept me showing the following error: You have not selected a database type to connect to. I digged into the system/database/DB.php file and realized that the load->database($config) was being interpreted as a DSN string. I solved this issue by adding the following line Code: if(!is_array($params)) Code: if (is_string($params) AND strpos($params, '://') === FALSE) I don't know if it's a bug. Keep up the good work.
[eluser]Derek Jones[/eluser]
Thanks Zebra, this has been recently fixed in the svn. |
Welcome Guest, Not a member yet? Register Sign In |