- PDO stands for PHP data object.
- PDO_MYSQL is a driver that will implement the interface between the data (database) and the user (the layer under the user interface, called the "code behind"), access to 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. Using this level, data can be normalized before being inserted into your data structure. (Capitals are Capitals, with no leading or trailing spaces, all dates are in the correct form.)
But there are a few nuances to this that you may not have suspected.
First of all, so far you have probably written all your requests in something similar to the URL, and you are passing parameters using the URL itself. Using PDO, all this is done under the user interface level. The user interface transfers the ball to the PDO, which transfers it to the field and puts it into the database for the 7-point TOUCHDOWN .. it gets seven points because it got it there and made it much safer than transferring information to the URL.
You can also pin your SQL injection site using a data layer. Using this middleware layer, which is ONLY a “player” that talks to the database itself, I'm sure you can see how it can be much more secure. Interface for datalayer for database, datalayer for database for datalayer for interface.
and
Using the best practices when writing code, you will be much happier with the result.
Additional sources:
Re: MySQL functions in 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 know more about this, this is the best book on the market, Grady Butch was the father of UML http://dl.acm.org/citation.cfm?id=291167&CFID=241218549&CFTOKEN=82813028
Or check with bitmonkey. There is a group there, I'm sure you could learn a lot.
<P →
If we knew what terminology really means, we don’t need to know anything.
<P →
Elaine Ossipov Aug 27 '13 at 13:22 2013-08-27 13:22
source share