aktiv
12-17-2009, 02:11 PM
ok say i have a table with 4 products in it, 3 of the products are in the hat category and 1 is assigned to the shirt category.
The ids are as follows:
id---------catid------prodname
1--------- 1--------- hat1
4--------- 2--------- shirt
8--------- 1--------- hat2
12-------- 1--------- hat3
each product is presented individually with a previous and next button(s) at the bottom of the page to flip from product to product...however only showing the next or previous product that are related in category.
Question is how do I get from id 1 to id 8. Would I use a less than or greater than based on the category passed on the url variable.
For example the variable to call product Id 1 would be http://abc.com/products.php?prod=1&cat=1.
Hope this makes sense. Thanks!:thumbsup:
The ids are as follows:
id---------catid------prodname
1--------- 1--------- hat1
4--------- 2--------- shirt
8--------- 1--------- hat2
12-------- 1--------- hat3
each product is presented individually with a previous and next button(s) at the bottom of the page to flip from product to product...however only showing the next or previous product that are related in category.
Question is how do I get from id 1 to id 8. Would I use a less than or greater than based on the category passed on the url variable.
For example the variable to call product Id 1 would be http://abc.com/products.php?prod=1&cat=1.
Hope this makes sense. Thanks!:thumbsup: