Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Handling related products

related products php

3:39 pm on Aug 18, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:May 18, 2006
votes: 0

Hi building a store in PHP and coming unstuck with the layout of the database and making a related products section.

Looking at creating a related_products table but unsure the best way to create a relationship between this and the products/products to cat tables.

Thinking of:


rel_id - prod_id_main - prod_id_also

If one the page where prod_id_main is showing pull results for any that match prod_id_also

Am I making this over difficult?

Hope someone can help

7:06 pm on Aug 18, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 25, 2003
votes: 0

If you products are category base why not pull products which are in the same category as the one in questions.

If thats not quite what you are after then when not created a related cell in your products database table, then add the related products ID's into this cell using a comma or some other delimiter to seperate each product relative to the one in question.

[edited by: PSWorx at 7:07 pm (utc) on Aug. 18, 2006]