Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB