Mix and match PDO and mysqli how far can you go?

Quick question:

I am building a site and using mysqli to access my database. I am just about to embark into a tutorial from phpAcademy written in PDO. my question is: I know I can use PDO and mysqli on the same page but how about db connection? do I need to create two different connections? can I pass variables from mysqli to pdo and pdo to mysqli? what kind of problem will I encounter along the way by mixing two different styles of communicating with my database?

I’d suggest you are going to want to use the one or the other. It makes no real sense to mix two different database interfaces. That would only make your application unnecessarily more complex. Remember KISS! :smile:


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.