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
Solved

PDO connections tutorial for beginners

Posted on 2014-01-07
5
432 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 109

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 109

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 109

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: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

808 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