© Christopher Pitt 2021
C. PittPro PHP 8 MVChttps://doi.org/10.1007/978-1-4842-6957-2_6

6. Building a Database Library

Christopher Pitt1  
(1)
Verbena Close 1, Stellenberg, Durbanville, Cape Town, South Africa
 

In the previous chapter, we built a registration form. Having validated the data, we stopped short of putting that data into the database. We’re going to do that in this chapter!

We’re going to build a solid foundation for the chapters to come, creating the code that will connect to multiple database engines and execute queries in a safe way. We’ll even throw in a migration system. Don’t worry if some of this is unfamiliar – we’ll go through things at a steady pace.

You’re going to need to have access to a MySQL database for most of the code in ...

Get Pro PHP 8 MVC: Model View Controller Architecture-Driven Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.