https:/ /ampps.com/ • Modern Dev Tooling: https:/ /github.com/sprintcube/docker- compose-lamp • Cross Platform with a Framework: https:/ /laravel.com/docs/8.x/ homestead 2 CC BY-NC 4.0 Justin Yost
a MySQL database that you can use in PHP (procedural and object-oriented patterns) • PDO - PHP Database Object, a consistent interface that enables you to connect to a variety of databases using a single pattern. 8 CC BY-NC 4.0 Justin Yost
to connect to a database. • PDO includes drivers for; MySQL, MS SQL, PostgreSQL, SQLite and more • Data Access Abstraction Layer - same PDO function to connect, run statements, return results, etc • Does not abstract away differences in the actual query language or engine 9 CC BY-NC 4.0 Justin Yost
placeholders, either named with a :name style or ? style • Can't mix and match the style of placeholders (go with named it'll make your life easier) • Bind user input to the placeholder, prevents the possibility of user input breaking your statements. • Don't quote the placeholder, just drop them in PDO will figure it out 13 CC BY-NC 4.0 Justin Yost
ORMs are present in frameworks, they provide an abstraction above and beyond PDO • PDO minimizes differences in executing raw SQL against a database engine • ORM minimizes the differences in the SQL variant used in the database engine • Many frameworks and ORMs don't even require you to know SQL 14 CC BY-NC 4.0 Justin Yost