- PDO stands for PHP Data Object.
- PDO_MYSQL is the driver that will implement the interface between the dataobject(database) and the user input (a layer under the user interface called "code behind") accessing your data object, the MySQL database.
The purpose of using this is to implement an additional layer of security between the user interface and the database. By using this layer, data can be normalized before being inserted into your data structure. (Capitals are Capitals, no leading or trailing spaces, all dates at properly formed.)
But there are a few nuances to this which you might not be aware of.
First of all, up until now, you've probably written all your queries in something similar to the URL, and you pass the parameters using the URL itself. Using the PDO, all of this is done under the user interface level. User interface hands off the ball to the PDO which carries it down field and plants it into the database for a 7-point TOUCHDOWN.. he gets seven points, because he got it there and did so much more securely than passing information through the URL.
You can also harden your site to SQL injection by using a data-layer. By using this intermediary layer that is the ONLY 'player' who talks to the database itself, I'm sure you can see how this could be much more secure. Interface to datalayer to database, datalayer to database to datalayer to interface.
And:
By implementing best practices while writing your code you will be much happier with the outcome.
Additional sources:
Re: MySQL Functions in the url php dot net/manual/en/ref dot pdo-mysql dot php
Re: three-tier architecture - adding security to your applications
https://blog.42.nl/articles/introducing-a-security-layer-in-your-application-architecture/
Re: Object Oriented Design using UML
If you really want to learn more about this, this is the best book on the market, Grady Booch was the father of UML
http://dl.acm.org/citation.cfm?id=291167&CFID=241218549&CFTOKEN=82813028
Or check with bitmonkey. There's a group there I'm sure you could learn a lot with.
>
If we knew what the terminology really meant we wouldn't need to learn anything.
>