• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the right way to use PDO directly in CodeIgniter 3?

#2
Extend PDO in a library. Load or autoload the library and make your connection in the constructor using custom configuration. You can see examples of this all over the internet. Since you're a newbie, this is a good way to learn how to use libraries with CodeIgniter. The problem would be that some other CodeIgniter libraries (or at least 1) depend on the CodeIgniter database connection. Sessions do if you use the database sessions.
Reply


Messages In This Thread
RE: What is the right way to use PDO directly in CodeIgniter 3? - by skunkbad - 09-27-2017, 08:17 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.