Database name problem - not possible choice dbname |
Hello All,
I have a big issue with database settings. it's my setting below: PHP Code: $db['default'] = array( My mssql_model.php file contains: PHP Code: class Mssql_model extends CI_Model When I call getInfo result is like this: PHP Code: Array When I call getTest() it's not working. It's looks like driver can't use parameter database. How to fix it or maybe I am wrong in my code? Before I used a mssql driver not pdo but now I have to change a server and mssql driver is not supported anymore. Thank you for your suggestions. Best regards, Grzegorz
Best regards,
Grzegorz (12-13-2016, 02:30 AM)grego Wrote: You don't need to assign the DB class, it's asigned by default. PHP Code: $this->load->database('default'); https://codeigniter.com/user_guide/datab...cting.html (12-13-2016, 03:49 PM)dsv Wrote:(12-13-2016, 02:30 AM)grego Wrote: Hello, Thank you for your reply. I have to add this because in my database configuration file I use different databases and for each database I use different settings. In model I use sometimes $this->db, another time $this->db2 to get data from different database. But this is not important for this issue because it is not working. I put your code, here is result: Code: object(CI_DB_pdo_sqlsrv_driver)#16 (74) { Any idea? Best regards, Grzegorz
Best regards,
Grzegorz |
Welcome Guest, Not a member yet? Register Sign In |