Hello everyone. I’m a newbie to learning the PHP language. So can you guys please explain the concept of “mysqli” and “PDO” in PHP for interacting with databases for me. Thanks
They are both libraries of functions used to interact between PHP and the database, with similar functionality. I prefer PDO because it also has the option to connect to databases other than MySQL, and when I was reading up on it, it seemed to be more straightforward to use.
My advice would be to ignore mysqli and learn PDO.*
PDO is the more modern approach and is much nicer to work with and better in many ways.
*The caveat being if you find yourself working on a site that already uses mysqli and you don’t have authority to change that.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.