Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
development:database [2020/02/27 14:04]
kalenpw created
— (current)
Line 1: Line 1:
-====== Database ====== +
----- +
-===== Many to Many Relationship Joins ===== +
-<code mysql> +
-SELECT  +
-  a.* +
-FROM  +
-  map_ads_categories m +
-  JOIN ads a ON (m.ad_id = a.id) +
-WHERE +
-  m.category_id = 28; +
-</code> +
-<code mysql> +
-SELECT  +
-  * +
-FROM  +
-  map_ads_categories m +
-  JOIN ads a ON (m.ad_id = a.id) +
-  JOIN categories c ON (m.category_id = c.id) +
-WHERE +
-  c.id = 28; +
-</code>+