Welcome Guest, Not a member yet? Register   Sign In
How can I use PDO in CI3.
#1
Wink 

I searched on google. But not found any proper solution. Confused
Reply
#2

Try this in your database configuration (e.g. for mysql)

PHP Code:
    'dsn'    => 'mysql:host=host_name;dbname=db_name',
    
'username' => 'usr',
    
'password' => 'pw',
    
'database' => 'db',
    
'dbdriver' => 'pdo'

Reply
#3

If i config only 'dsn' than i think 'database' and 'server' field will not use if i comment both than its not work but when i comment out dsn than its also works.

And 'dbdriver' => 'pdo' // show me invalid data driver Sad
Reply
#4

Its working now. what the hell with yesterday same setting but not worked yesterday but wholla works today fine. Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB