MySQL is a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL)
PDO stands for PHP Data Objects. A PHP extension that defines a lightweight, consistent interface for accessing databases in PHP.
PDO provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data.
A prepared statement is a feature used to execute the same (or similar) SQL statements repeatedly with high efficiency.
Prepared statements basically work like this:
Some advantages: