Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 13th, 2004, 08:20 PM
the_invincible the_invincible is offline
The Iceman
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 110 the_invincible User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 32 m 25 sec
Reputation Power: 4
Sorry i mistakenly posted it on this forum, now i have posted it to the correct forum..

Sorry for inconvience.

Last edited by the_invincible : September 13th, 2004 at 08:31 PM. Reason: posted on Wrong forum

Reply With Quote
  #2  
Old September 13th, 2004, 08:30 PM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,266 jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 23 h 15 m 4 sec
Reputation Power: 744
With the PEAR route, you're creating an object from a class definition. You're then using the methods defined in that class to interact with the database. The advantages are plentiful.

If you use mysql_query() in your scripts, and you then want to take advantage of the new mysqli_query(), you'd have to go through all your scripts and make the change. Not a big deal with a couple of scripts; a huge deal with a couple hundred.

If you decide MySQL isn't working for you and you want to use something different, you can create a class with the same methods from your MySQL class, change your database, and that's it. No need to change mysql_query() to foo_query() in all your scripts.

In addition, database classes can provide debugging support, where each query sent through it is stored in the object along with the number of returned/affected rows or any errors that occurred. During debugging, you can then retrieve those messages/errors to help sort out problems.
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > PHP Database Connection


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway