Hello to all. I have such a task and I don’t know how the best, that is, it is necessary to create a module for assembling computers from parts that are stored in the database and make compatibility, so that it wouldn’t be possible that you could install percents on the motherboard AMD. Intel or something else ... and I have been sitting for a couple of weeks and I think how to organize it, make compatibility by category or for every detail, and what to use as a comparator. DB on MySQL and PHP. Thank.

  • one
    Answer this question - is incompatibility going by manufacturers or by parts? and then it will be easier - Ale_x
  • do clipping. In particular, for mothers-procs - a socket, mother - a memory type of memory, frequency and number of slots, as well as the maximum volume probably - zb '14
  • incompatibility on the details - scalpel

2 answers 2

The task will become typical if you look at it as if it were "Recommended":

People buys an AMD motherboard and is recommended by AMD processors. If he is hard-nosed and wants Intel without fail, let him buy, of course - all of a sudden it is for another computer.

Another option, to prescribe a clear scenario: what first, what later. Start with the motherboard, then the percents, then the memory, etc.

Technically - create a table of one-way links:

id; title; options 1 ; "материнки AMD такие-то" ; id_проц_AMD1,id_проц_AMD2, .. id_ram_1; 2 ; "материнки AMD другие" ; id_проц_AMD5,id_проц_AMD6, .. id_ram_11; 3 ; "материнки Intel раз" ; id_проц_Intel1,id_проц_Intel2, .. id_ram_11; 

And in products, for example, a specific motherboard - the "recommended" field contains this id of the recommended set.

  • On such an option as if the client wants only components or a computer in the assembly, I thought at the beginning to ask him and tick. - scalpel

When adding a product, specify a socket, after selecting a motherboard, search for processors WHERE socket = motherboard.socket