Maintain a Single Database Object in PHP 5 Using the Singleton Pattern
When creating a PHP application, it is usually necessary to connect to a database to perform certain tasks. In some cases you only want to open a connection when necessary, but limit it to a single connection. This way you don't waste resources on unnecessary database connections. For these situations I use the Singleton Pattern, which is perfect for this.
- Visit Site:
- Maintain a Single Database Object in PHP 5 Using the Singleton Pattern
- Filed in:
-
PHP / Tutorials & Tips / Development
- Date Added:
- Aug 12, 2009
- Last Updated:
- Aug 13, 2009
License and Pricing Information
PHP
Price: $0.00 USD
| Publisher site visits: | 59 |
|---|---|
| Average rating: | 0.00 |
| Total ratings: | 0 |
Publisher Info
- Author:
- UltraMega Tech.
Other listings by this publisher
- Lock My Stuff
- Creating an Upload Progress Bar in PHP with APC
- Simple PHP Page Template System
- Creating a CAPTCHA in PHP with GD
- Creating a Calendar in PHP
- Accessing the Command Line From PHP
- Creating a TinyURL Clone
- Creating a BBCode Parser
- Working With Time Zones in PHP
- Snippet: Autoloading Objects (PHP 5)
- Snippet: Converting Seconds to Readable Time (PHP & JS)
- 5 Tips for Writing Cleaner PHP Code
- Create a Slide-In Panel with jQuery
- Fetch Twitter Updates in PHP
- Generating (X)HTML Documents Using DOMDocument In PHP
- Modifying Templates Using DOMDocument In PHP
- Using MySQL Prepared Statements in PHP
- Add Records to a Queue with jQuery
- 5 Basic PHP Security Tips
- Degradable Tabs With jQuery UI
- Basic Overview of Loops in PHP
- Default Form Values with jQuery
