We can connect the Microsoft SQL Server 2008 R2 rdbms to php with codeigniter framework. For that we need to install sqlsrv driver on our server. SqlSrv is a php driver for MS SQL and is available from Microsoft: » http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx. For earlier version of php before 5.3 , the Mssql driver was needed. The Mssql extension is not available anymore on Windows with PHP 5.3 or later. After we have sqlsrv driver extension added on server, we can check it on our phpinfo page. The sqlsrv should be there. We may need to install the odbc driver too depending on our system configuration. If there is a problem with connecting sql server database, we can debug to know the error. Then we need to add the following configuration on our database configuration file. $db['default'] = array( 'dsn' => '', 'hostname' => '.\sqlexpress', 'username' => '', ...
IT graduate and a professional web developer having specialization on magento, ci, opencart, wordpress