Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

PDO connections tutorial for beginners

Posted on 2014-01-07
5
Medium Priority
?
437 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

618 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