CodeIgniter Forums

Full Version: PDO with MSSQL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

In case you need to use PDO with MSSQL you will need to hack the pdo_driver:

this->hostname .= ";dbname=".$this->database;

Needs to be:

if (strstr($this->hostname, 'sqlsrv') == TRUE){
} else {
   $this->hostname .= ";dbname=".$this->database;

Hope this saves someone a headache!