It's all in the database. :)
You would create a Categories table and that would have an ID
number that
would assign automatically and a Category that would contain
the name of the
category. You could then display those on your page with a
select all
recordset and a repeat region .. and make them links that
would link to the
products of that category by making the CategoryID the filter
of the
recordset on the product display page.
In your products table you want to add a column for the
Category ID and put
the Category ID that each product belongs to in that column.
That is called
the "foreign key" and can then be used in your query to
select Products
WHERE CategoryID = 1 or whatever.
Make sense?
--
Nancy Gill
Adobe Community Expert
BLOG:
http://www.dmxwishes.com/blog.asp
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
Web Development
"irvb" <webforumsuser@macromedia.com> wrote in message
news:eanid1$gvc$1@forums.macromedia.com...
> I'm very much a beginner with dynamic web apps, but I've
managed to create
> a
> simple catalog. I created a recordset that selects all
of the products
> and
> displays them on the page. I'd like to divide the
products into
> categories by
> using different query criteria in my recordset, and I
started to do this
> by
> creating a different php files for each page... very
tedious and does not
> seem
> very efficient. I figured that there is a much better
way to do it but I
> really don't know what it is.
>
> click here to see
http://www.bwdusa.com/all_products.php
>
> Ideally, I'd like the links in the category menu to
somehow modify the
> recordset and display the new list of products
accordingly. I'm sorry if
> this
> is already in the archives but I have no clue what to
search for.
>