© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
D. PowersPHP 8 Solutionshttps://doi.org/10.1007/978-1-4842-7141-4_17

17. Pulling Data from Multiple Tables

David Powers1  
(1)
London, UK
 

As I explained in Chapter 13, one of the major strengths of a relational database is the ability to link data in different tables by using the primary key from one table as a foreign key in another table. The phpsols database has two tables: images and blog. It’s time to add some more and join them, so that you can assign categories to blog entries and associate images with individual articles.

You don’t physically join multiple tables, but rather do so through SQL. Often, you can join tables by identifying a direct relationship ...

Get PHP 8 Solutions: Dynamic Web Design and Development Made Easy 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.