• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PDO with MSSQL

#1
[eluser]ci_user[/eluser]
In case you need to use PDO with MSSQL you will need to hack the pdo_driver:

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

Needs to be:

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

Hope this saves someone a headache!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.