PDO connection

I don’t want to get too far into terminology, because I don’t know it - I’ll leave someone else to explain that, or you can find an OO tutorial I’m sure. For example, while I’d refer to query() as a function, I have an idea it should be more properly called a method when it’s part of a class.

$dbc2 is the database connection. In your example code $dbc1 is just a string containing information that helps you create a database connection, along with those other strings ($user, $pass) that you pass into the constructor.

1 Like

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