Welcome Guest, Not a member yet? Register   Sign In
Using PDO for database connection
#1

I'm trying to use PDO driver to access the database:
 my database config:
PHP Code:
public $default = [
        
'DSN'      => 'pgsql:host=localhost;port=3306;dbname=cipm',//I add this based on documention
        
'hostname' => 'localhost',
        
'username' => 'root',
        
'password' => '123',
        
'database' => 'cipm',
        
//'DBDriver' => 'MySQLi',
        
'DBDriver' => 'PDO',
        
'DBPrefix' => 'pr_',
        
'pConnect' => false,
        
'DBDebug'  => (ENVIRONMENT !== 'production'),
        
'cacheOn'  => false,
        
'cacheDir' => '',
        
'charset'  => 'utf8',
        
'DBCollat' => 'utf8mb4_general_ci',
        
'swapPre'  => '',
        
'encrypt'  => false,
        
'compress' => false,
        
'strictOn' => false,
        
'failover' => [],
        
'port'     => 3306,
    ]; 
error: 
Code:
Class '\CodeIgniter\Database\PDO\Connection' not found
Does CI 4.0.4 suppor PDO?
Reply


Messages In This Thread
Using PDO for database connection - by pars1997 - 09-15-2020, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB