Which is a better way to connect to a database

Very good. And, theoretically, if we were using multiple connections (for whatever reason), we could make $db and array of objects with certain ids or types or whatever for the connection identification.

Scott