Skip to content

Instantly share code, notes, and snippets.

@cikal
Created April 25, 2020 05:57
Show Gist options
  • Save cikal/98f362c687772e0976f62d053cb9f170 to your computer and use it in GitHub Desktop.
Save cikal/98f362c687772e0976f62d053cb9f170 to your computer and use it in GitHub Desktop.
CodeIgniter 3 Microsoft Access
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
|
| ... TLDR; CI Docs Banner ...
*/
$active_group = 'default';
$query_builder = TRUE;
# Note :
# Please replace in variable hostname, into where your database location places
# 'hostname' => 'Driver={Microsoft Access Driver (*.mdb)};Dbq=/absolute/path/to/your_database_name.mdb',
# Example:
# My DB location is (./application/database/here.mdb), then 'hostname' variable will be :
# 'hostname' => 'Driver={Microsoft Access Driver (*.mdb)};Dbq='.APPPATH.'database/here.mdb',
#
$db['default'] = array(
'dsn' => '',
'hostname' => 'Driver={Microsoft Access Driver (*.mdb)};Dbq=/absolute/path/to/your_database_name.mdb',
'username' => '',
'password' => '',
'database' => 'your_database_name.mdb',
'dbdriver' => 'odbc',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'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