I have two tables store_items and store_categories. They both have a common field called cat_id. I have displayed the store_categories table and want when one category is selected for the id to be passed through the url and display the store_items table that correspond to the id.
<code> "SELECT * FROM store_categories WHERE store_categories.id = store_items.cat_id GROUP BY title";</code>
Is this how I join the two tables?
Then in the body linking the table:
<code><a href="categories.php?id=<?php echo $row_rs_categories['id']; ?>"><?php echo $row_rs_categories['cat_title']; ?></a></code>
<code> "SELECT * FROM store_categories WHERE store_categories.id = store_items.cat_id GROUP BY title";</code>
Is this how I join the two tables?
Then in the body linking the table:
<code><a href="categories.php?id=<?php echo $row_rs_categories['id']; ?>"><?php echo $row_rs_categories['cat_title']; ?></a></code>