• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 439
  • Last Modified:

PDO connections tutorial for beginners

HI

I would like to enter to the world of PDO connections from PHP to MySQL, would mind to bring a tutorial for beginners?

Thanks in advance.
0
dimensionav
Asked:
dimensionav
  • 3
  • 2
2 Solutions
 
Ray PaseurCommented:
Common question, now-a-days!

This article maps the familiar, but now obsolete MySQL extension to PDO.  Have a look and please post back with any specific questions.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Databases/A_11177-PHP-MySQL-Deprecated-as-of-PHP-5-5-0.html

Best regards, ~Ray
0
 
dimensionavAuthor Commented:
Ray, when you say obsolete MySQL extension to PDO, you mean that there is another technology that substitutes PDO?

The idea to learn PDO is the capability of avoiding SQL injection, is that true?
0
 
Ray PaseurCommented:
You may want to read the article; it will answer a lot of questions, especially if you follow the links that will lead you to many good learning resources.

PHP is removing MySQL support.  PHP intends to continue with MySQLi and PDO support.

PDO takes an approach of binding variables to queries in ways that prevent SQL injection.  But so does MySQL and MySQLi if the programmer knows how to write the programs.  The problem that leads some organizations to PDO is pretty simple: They hire idiots, and idiots do not read the manuals or know where to look for state-of-the-art guidance.  Instead, they copy whatever dreck they can find on the internet, and when their data base is attacked with SQL injection they find themselves in misery, and crying out for a quick fix.

As the great oil well firefighter Red Adair famously said, "If you think it's expensive to hire a professional, just wait till you hire an amateur!"

SQL injection is one of the important topics in web security.  There are many others, and they are all followed at OWASP.  And if PHP had been designed correctly, it would never have been an issue, but PHP is a funhouse language full of dumb things that make it insecure and hard to use.
0
 
dimensionavAuthor Commented:
Great comments, Ray, thank you very much!
0
 
Ray PaseurCommented:
Thanks for the points and thanks for using EE.  As you work through this, we welcome your questions back here! ~Ray
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now