Forum Moderators: coopster
More than one of my classes (that is needed in the same script) needs to connect to a MySQL database. I have written a MySQL-connect class that opens up the connection and gets me a resultset. Of course I can get this to work in different classes at the same time, but it means opening up a separate connection to the database for each class.
Is there a better way to do this? Maybe by using another function than mysql_connect, or is there any way to have a global class, which can be used everywhere in the script.
Any takers?
Thanks for any help.