Hai,
when we learn about PHP specialy CI Framework on scholl we always introduce with mysql as database. now I will share my little knowledge. how to connect CI framework with postgresql
lets open database.php at folder application/config/
default dbdriver on CI is on mysql driver. change to postgre driver, database postgre use case sensitive. so set user and password with your postgresql database.
if you use XAMPP, you must change some configure (Config XAMPP to Connect with Postgresql). connect xampp with postgresql but it will more practice if you use WAPP.
Your Apache connected to postgresql without need to configure anymore. installing WAPP on windows is very easy. Keep Practice. :0
when we learn about PHP specialy CI Framework on scholl we always introduce with mysql as database. now I will share my little knowledge. how to connect CI framework with postgresql
lets open database.php at folder application/config/
//Connection to Postgre $db['default']['hostname'] = 'localhost'; $db['default']['username'] = 'postgres'; // Your User at Postgresql $db['default']['password'] = ''; // Your password at Postgresql $db['default']['database'] = 'datane'; // database postgresql $db['default']['dbdriver'] = 'postgre'; //db driver from default mysql or mysqli change to postgre $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default']['dbcollat'] = 'utf8_general_ci'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE;
default dbdriver on CI is on mysql driver. change to postgre driver, database postgre use case sensitive. so set user and password with your postgresql database.
if you use XAMPP, you must change some configure (Config XAMPP to Connect with Postgresql). connect xampp with postgresql but it will more practice if you use WAPP.
Your Apache connected to postgresql without need to configure anymore. installing WAPP on windows is very easy. Keep Practice. :0
Comments
Post a Comment