|
Hi Barry,
if i understand your problem correctly,
my first thought is as follows:
make a rules table
product_id_A, rule_id, product_id_B
You can setup a page where you link each item (add
records to this table) using rule.
Examples of a rule would be:
- "A will only work with B device" (this rule
would only be relevant to product A)
- "A will only work with B device and B will only
work if a is supplied" (this rule would be relevant for product A &
B)
- "B is a recommended accessory for A" (this rule
would only be relevant to product A)
- "B is a recommended accessory for A and B will
only work with A" (this rule would be relevant for product A &
B)
Then you setup a table to store all these rules.
Then if someone selects an item you can do a quick
query to see if anything is relevant in the rules table:
SELECT product_id_A, tbl_rules.rule_id,
product_id_B, tbl_rules_info.rule_name
from tbl_rules, tbl_rules_info
WHERE
tbl_rules.rule_id =
tbl_rules_info.rule_id
AND (product_id_a =
#prod_id#
OR
(product_id_b = #prod_id#
AND tbl_rules_info.relevant_to_B =
"yes"
)
Then you output whatever rules are
relevant.
Is this what you were thinking?
Gav
----- Original Message -----
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004 |
