Definition of PDO
PHP DATA OBJECTS-is an object oriented library built into PHP that makes it easy for PHP scripts to talk with databases.
You may find PDO a little tough in beginning because we are habitual of too much easy mysql_* functions. I also faced this complexity but believe me you will be habitual after some practice. One of the benefits of PDO is that we don’t have to write separate functions to prevent SQL Injection because PDO driver do this itself.
Making connection with PDO
|Click and download firefox|
You can also use id=? in place of :id but many people think these are less human readable.
This was the small introduction of PDO and i want to keep it small. I will soon publish its Part-2.
For any questions or feedback, comment below.
Thanks for reading!