Free Newsletters:
DatabaseDaily  
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum DBA Videos
internet.com

» Database Journal Home
» DBA Videos
» Database Articles
» Database Tutorials
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed



follow us on Twitter

Marketplace Partners
Be a Marketplace Partner

internet.commerce
Be a Commerce Partner


















Mariposa Bot Shipped With Vodafone Smartphone

IT Job Market Heating Up: Report

Bing Makes Strides But Momentum Stalls

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Database Journal | DBA Support | SQLCourse | SQLCourse2







Finance Developer (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

PHP

October 22, 2002

PHP and Working with Databases (for the Lazy Sod)


Conclusion

In this article we have spoken about the benefits of atomic operations, database abstraction and the use of classes.

atomic operations - We have converted the usual gunk of working with databases into a small number of key functions that do no less and no more than needed.

database abstraction - We have created a new set of functions that are entirely database independent (simply by switching one include file). Even better, these new functions require much less code than traditional methods of working with databases (due to our atomic operation implementation).

classes - We have wrapped all of the above up into a nice, easy to use, class/object. This is handy because it allows us to do things like easily manage two concurrent server connections (should we so wish) as well as cache results and offers us neat functions that won't get confused with other global scope functions.


Final Note

If you would like to see more examples of how to work with the class I've written (ezSQL) and how it can make your life easier, just go and have a look at http://php.justinvincent.com.

For a full-blown example of a busy Website built using all the above concepts and the ezSQL class, visit http://vip.channel.ac. It is a collaborative environment where about 2700 users post News, Pictures, Links and FAQs. It also has busy Forums and Live chat. It took about two months to build from scratch (no external scripts or software were used). It gets approximately 95,000 hits to the mySQL database per day (all via ezSQL) and it runs like a charm.

If you would like to help by porting ezSQL to another database platform, please feel free to do so and mail me the code (justin_at_visunet_dot_ie). I will include it in any future distributions. As stated, the only functions you need to change are $db->db, $db->select and $db->query. At the time of writing this article, ezSQL is available for mySQL and Oracle8.

Justin Vincent




Go to page: Prev  1  2  3  4  5  6  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

PHP Archives








Latest Forum Threads
PHP Forum
Topic By Replies Updated









The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers