Skip to content

Instantly share code, notes, and snippets.

@heyitsnovi
Created December 18, 2019 01:33
Show Gist options
  • Save heyitsnovi/39f72070fe8f0d838101bbaabf04ad22 to your computer and use it in GitHub Desktop.
Save heyitsnovi/39f72070fe8f0d838101bbaabf04ad22 to your computer and use it in GitHub Desktop.
CodeIgniter MSSQL connection settings
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'Driver={SQL Server};Server=DESKTOP-123456;Database=database_name',
'username' => 'username_here',
'password' => 'password_here',
'database' => '',
'dbdriver' => 'odbc',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment