• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter 3 and sqlsrv

#1
How can i connect sql server 2008 and code?
i use sqlsrv dll in my php5.4
How can i config my config>database?
Reply

#2
SQLSrv Driver Installation could be tricky sometimes but

if you've configured your server environment correctly this should help you:

PHP Code:
$db['mssql'] = array(
    
'dsn'    => 'sqlsrv:server=192.168.0.1,1433;Database=xxx',
    
'hostname' => '',
    
'username' => 'xxx',
    
'password' => 'xxx',
    
'database' => '',
    
'dbdriver' => 'pdo',
    
'dbprefix' => '',
    
'pconnect' => FALSE,
    
'db_debug' => TRUE,
    
'cache_on' => FALSE,
    
'cachedir' => '',
    
'char_set' => 'utf8',
    
'dbcollat' => 'utf8_general_ci',
    
'swap_pre' => '',
    
'autoinit' => TRUE,
    
'encrypt' => FALSE,
    
'compress' => FALSE,
    
'stricton' => FALSE,
    
'failover' => array(),
    
'save_queries' => TRUE
); 

if you've troubles to install sqlsrv 3.1 or higher you might take a look at this Resource 
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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