Just a little more help.
I've got the admin pages working great for creating and editing the related items table, but I'm struggling with the table join for the front end.
We have an item detail page that needs to display related products. There are two tables to deal with, tbProducts and tbLikeItems. Taking the URL Parameter 'partno' , the MySQL statement would need to select all items from tbProducts where tbLikeItems.ParentNo = the URL Parameter 'partno', and then select various columns from tbProducts where tbLikeItems.ChildNo = tbProducts.partno .
I know this involves a table join, but the part that confuses me is that tbProducts has to be used on both ends of the query, as the identification for primary id (partno) and then returning info from tbProducts that match in the tbLikeItems.
Can anyone give me a rough framework for the query statement?
Tables are as follows:
tbProducts
-------------
id
title
partno (product part number)
various other columns of info...
tbLikeItems
------
id
ParentNo (product part number of the primary item)
ChildNo (product part numbers of the related items to be shown)