Solved

PDO connections tutorial for beginners

Posted on 2014-01-07
5
425 Views
Last Modified: 2014-01-07
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
Comment
Question by:dimensionav
  • 3
  • 2
5 Comments
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39763686
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
 

Author Comment

by:dimensionav
ID: 39763728
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
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 500 total points
ID: 39763734
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
 

Author Closing Comment

by:dimensionav
ID: 39763823
Great comments, Ray, thank you very much!
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39763901
Thanks for the points and thanks for using EE.  As you work through this, we welcome your questions back here! ~Ray
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now