SupaMonkey Posted May 23, 2006 Share Posted May 23, 2006 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 them2) Create a new table and create a new record for every related product for each product3) Something else you guys may think of?My worthless-based-on-nothing impressions are:1) Would be faster, more efficient2) Would be easier to make initially, but slower/less efficientAny takes on this or any suggestions? Link to comment https://forums.phpfreaks.com/topic/10249-tablecolumn-optimisation-enquiry/ Share on other sites More sharing options...
Barand Posted May 23, 2006 Share Posted May 23, 2006 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] Link to comment https://forums.phpfreaks.com/topic/10249-tablecolumn-optimisation-enquiry/#findComment-38342 Share on other sites More sharing options...
SupaMonkey Posted May 24, 2006 Author Share Posted May 24, 2006 Couldnt I just retrieve the CSV column then explode it, then loop through it and get each id's data with a query? Link to comment https://forums.phpfreaks.com/topic/10249-tablecolumn-optimisation-enquiry/#findComment-38502 Share on other sites More sharing options...
Barand Posted May 24, 2006 Share Posted May 24, 2006 Yes. You could go the whole hog, uninstall MySql and just use a text file. Link to comment https://forums.phpfreaks.com/topic/10249-tablecolumn-optimisation-enquiry/#findComment-38685 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.