Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
Marked

An intro to PDO

Recommended Posts

I've been really busy over the last few weeks with the semester coming to end and also with a new project which I hope to release as a live website. But don't worry, all the practice will make me better when it comes to rmxpunlimited developments :)

 

Anyway, I stumbled upon a really good and tut (and website, one of many) and I'm going to give you guys the link. This is for people writing their websites in php using a mysql database. Here's the opening paragraph:

So from the sounds of most threads in the PHP forum here, all folks know how to use is the mysql_connect family of functions when it comes to talking to a MySQL server. And that sucks. Here's why:

 

* The mysql_ library was meant only for MySQL versions earlier than 4.1. Most MySQL installations are using version 5.1. 5.5, at the time of this writing, is in preview stages.

* MySQL 4.1 was released in 2004. It's currently 2010. The mysql_ library has been obsolete for SIX YEARS.

* The mysql_ library isn't object-oriented. Including it in modern-day PHP produces very messy code that's impossibly hard to manage.

* The library is slow. Not going into specifics, much of the processing for the mysql_ library is done inside of PHP itself instead of being performed natively, which is a huge performance hit. Additionally, using mysql_ forces you to concatenate lots of strings to do what you need to do, which is another performance hit.

* The library is insecure. Cryptic functions like mysql_real_escape_string had to be written into it solely to help programmers write code that wasn't completely open to hackers, and even WITH that most sites are still at risk.

* You don't have access to a huge (huge!) number of really awesome MySQL 4.1+ features when using this antiquated library.

So this tut introduces the PDO library and shows you how to use it. A general knowledge of SQL is probably required, but the tutorial is pretty simple to follow for nearly everyone.

 

Go to Tutorial

 

Hope this helps. I really agree with the author here after using the mysql_ php functions, they really are obsolete.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...