Trying to understand the basis of php for an online catalog
Posted: Thu Feb 18, 2010 3:38 pm
Im trying to wrap my head around how a php based online catalog works.
Firstly, you establish your categories in a database and display them by calling each row. So for the example we will use the category of dogs. When you select the dog category you run a query which returns each product listed under dogs and you then display each row for the product list. When you select a product you are essentially selecting a row in the database which you then display that information for (product name, description, etc).
Now I think my difficulty is the product urls. Say I select the dog named Abby how do I produce a url like http://www.dogsforsale.com/Abby. For some reason I am finding it difficult to understand this concept without knowing how to establish a unique url for each product. Is it simple created based off the criteria I use to identify each row (Normally the primary key) or can I create a column named product url and assign that as the url?
Firstly, you establish your categories in a database and display them by calling each row. So for the example we will use the category of dogs. When you select the dog category you run a query which returns each product listed under dogs and you then display each row for the product list. When you select a product you are essentially selecting a row in the database which you then display that information for (product name, description, etc).
Now I think my difficulty is the product urls. Say I select the dog named Abby how do I produce a url like http://www.dogsforsale.com/Abby. For some reason I am finding it difficult to understand this concept without knowing how to establish a unique url for each product. Is it simple created based off the criteria I use to identify each row (Normally the primary key) or can I create a column named product url and assign that as the url?