ok. I'm new to php so bare with me...
I am using the database object from phplib7. I have a bunch of classes and many of the methods in the classes use the database object (which makes a connection using pconnect). My question is, at present, I create a new dbobject in each method that needs it. I'm assuming that isn't the best approach. Can somebody suggest what the best way to approach this is? I think that everytime I call new, if the connection is made with the same user, password, database then it sends me the already existing connection, so I don't think it's making a new connection everytime I make an object but it just seems wrong to be creating a new object in each method....help! :-)
Thanks,
Aliza