Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Joining 2 table + passing url

Status
Not open for further replies.

tshey

Technical User
Dec 28, 2005
78
AU
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>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top