O'Reilly logo

PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Performing Joins

Because relational databases are more complexly structured, they sometimes require special query statements to retrieve the information you need most. For example, if you wanted to know what categories the www.php.net URL is filed under, you would need to find its url_id from the urls table, use that to retrieve all the url_category_ids from the url_associations table, and then retrieve the actual category values from the url_categories table for those url_category_ids. As you can see, this requires several steps and queries. By using a join—an SQL query performed by cross-referencing tables—you can accomplish all of that in one fell swoop.

Several types of joins are conceivable according to SQL. Beginning to intermediate users ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required