I have a session class that needs to store session information in a MySQL database. Obviously I will need to query the database in the methods of this class. In general I may need to connect more than one database simultaneously and may or may not be connected to that database already.
Given that, what's the best way to access databases for the session class or any class for that matter. Would creating a class to manage connections make sense?