phpsqllogic

Create logic for SMART attributes


I'm building an product inventory application which allows users to create a master template for a product, for example:

    CPU 
      - cpu_option1
      - cpu_option2
      - cpu_option3
    MEM
      - mem_option1
      - mem_option2
      - mem_option3

When I select cpu_option1 then mem_option2 and mem_option3 are not available.

These rules are not pre-programmed, these rules are created/changed by any user

I'm searching far and wide for examples of these kinds of smart attributes and how to implement the logic/design pattern.

ontopic: I'm looking of a design pattern of storing and using these rules


Solution

  • The DB could look like this:

    This example shows that

    If this answer your question?