Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14114

What is the right way to use PDO directly in CodeIgniter 3?

$
0
0
I prefer to use PDO rather than codeigniter provided db class. i want to execute fetchAll(), prepare() statements which is not supported in db class provided by codeigniter

If i want to use PDO directly , should i place $db = new PDO($dsn,$username,$password); in every model class ? .

Is that bad ? What is the right way?

i am a newbie .

Viewing all articles
Browse latest Browse all 14114


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>