In this lesson, you will learn how to connect to the database from PHP using PHP Data Objects or in short PDO. PDO provides data access layer abstraction where common methods can be used to interact with different databases like MySQL, SQLite, and so on. You will learn about prepared statements, what SQL injection is & how it works, how to prevent SQL injection, learn about the difference between binding params by value or by reference, the difference between placeholders & named parameters, emulated prepares & so on.
NOTE: If you have concerns/questions about 15:28 please watch the beginning of Part 2 of the PDO lesson, I address & explain there. This is just a debug query & to save an extra line I decided to pass an integer directly to the query. I don't recommend you do that, even though this particular example has no SQL Injection vulnerability, someone might make a mistake & introduce the vulnerability. https://www.youtube.com/watch?v=e6yLUvpcOZo
SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
NOTE: If you have concerns/questions about 15:28 please watch the beginning of Part 2 of the PDO lesson, I address & explain there. This is just a debug query & to save an extra line I decided to pass an integer directly to the query. I don't recommend you do that, even though this particular example has no SQL Injection vulnerability, someone might make a mistake & introduce the vulnerability. https://www.youtube.com/watch?v=e6yLUvpcOZo
SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL

Be the first to comment