?
Solved

PDO connections tutorial for beginners

Posted on 2014-01-07
5
Medium Priority
?
435 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 2000 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 111

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

762 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