|
-
Jun 22nd, 2006, 09:24 AM
#1
Thread Starter
Lively Member
global db object?
I have a database class which I use throughout my application, now to me it doesn't make much sense to create a new variable and instance of the class to handle some operations. How would I go about doing something as in having maybe another class...(or module?) that would return me a reference to my database object if one exists, otherwise creating a new instance if it doesn't?
Bascially, i'd like to be able to have one going, and anywhere I need it to just say db.func().
Any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|