How to use sql server 2012 as my database in codeigniter -
i want build application in codeigniter , want use sql server 2012 database
i have not tried yet , don't know should start.
1- how can configure codeigniter use sql server 2012 database?
2- can use codeigniter active records retrive data sql server databbase?
3- if can not use codeigniter how can use sql server query inside codeigniter models?
please give me detailed explanation example codes.
thanks.
it can done setting of databases in config->database.php add own configuration of database like
//sql cofig setting
$db['rajeev']['hostname'] = 'localhost'; $db['rajeev']['username'] = 'rajeev'; $db['rajeev']['password'] = 'rajeev@123'; $db['rajeev']['database'] = 'rajeev_ci'; $db['rajeev']['dbdriver'] = 'sqlsrv'; $db['rajeev']['dbprefix'] = ''; $db['rajeev']['pconnect'] = true; $db['rajeev']['db_debug'] = true; $db['rajeev']['cache_on'] = false; $db['rajeev']['cachedir'] = ''; $db['rajeev']['char_set'] = 'utf8'; $db['rajeev']['dbcollat'] = 'utf8_general_ci'; $db['rajeev']['swap_pre'] = ''; $db['rajeev']['autoinit'] = true; $db['rajeev']['stricton'] = false;
then set $active_group this
$active_group = 'rajeev';
Comments
Post a Comment