Jump to content


Photo

Pear DB - should i use it?


  • Please log in to reply
4 replies to this topic

#1 redgorilla

redgorilla
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 08 May 2006 - 07:19 PM

Hi. I have started right now my first medium sized project in PHP/MySQL and have following questions.
Should i use pear extension to handle db transaction. Is it faster and more secure then write simple db handling class or use existing on? Please advice to rookie - i don't want waste time inventing one more bicycle:-)


#2 redgorilla

redgorilla
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 09 May 2006 - 03:17 AM

Is pear db class faster then core php mysql function? Does anyone have some comparison of this 2 option?

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 10 May 2006 - 03:36 PM

Having never used either, I can't speak to speed/performance; however, the mysql functions in PHP aren't part of the "core" function set either; and AFAIK, the PEAR class is much more intuitive and robust.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#4 redgorilla

redgorilla
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 10 May 2006 - 06:00 PM

Also is pear protect from sql injection? I really don't sure should i use it or not. I will use MySQL 100%, so no other databases. I think using different database type is strongest side of Pear DB abstract layer. There are a lot of programmers here that developed big projects i think so please advice what do you use to handle database connection.

#5 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 10 May 2006 - 08:42 PM

It may offer such protection, but it's easy to add it yourself. Just because you're only using MySQL now doesn't mean you shouldn't take advantage of a DB-independent abstraction class.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users