learn-pdo-php

Learn PDO In 30 Seconds

phpdelusions is my main go to guide for everything php/pdo. But to just get started with PDO you really only need to know a few commands. PDO is great because it’s more secure, prevents SQL injection attacks if used properly, and it’s super simple to use. The question mark is used as a placeholder for variables to be swapped with the arrays passed into the execute statement.

Create a PDO Instance

 

Insert

 

Update

 

Delete

 

Select

Selects are a bit more involved but PDO makes them very simple too.