Jump to content

Recommended Posts

Ok, so I am gonna jack up my product catalogue script a bit as it is getting slightly outdated. One of the new features is "Other related products"

Now, my question is, which would be better:
1) Adding a column to a products "related_products" and just put csv ID's of other products in there and just explode,etc. whenever i need them
2) Create a new table and create a new record for every related product for each product
3) Something else you guys may think of?



My worthless-based-on-nothing impressions are:
1) Would be faster, more efficient
2) Would be easier to make initially, but slower/less efficient

Any takes on this or any suggestions?
Link to comment
https://forums.phpfreaks.com/topic/10249-tablecolumn-optimisation-enquiry/
Share on other sites

No contest - use a separate table.

If you have a csv field of id's you can't join those ids to the product file to get descriptions etc of the related products.

[code]
product              related_prods
----------           --------------
prod_id     <----+    rec_id
description      |
price            +--- prod_id
                 |
                 +--- rel_prod_id
[/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.