There is a site offering some services as a commodity. The user walks through the pages and suddenly finds the service he needs. Click to buy. Suppose it is already registered / authorized on the site. After clicking on "buy", he goes to the payment page, where he chooses the method of payment, delivery, etc. Pays for the service. Further, in his personal account should display the history of his purchases, services rendered (not rendered, but purchased).

The question is: how to link this paid service to this user in order to display its name (price, some other characteristics) in this user's personal account?

If you simply add fields to the database for some ID of these services, then I do not know how many services the user will buy. Ie I can’t just add 100,500 fields to it and fill them in as services are purchased. Also, I can’t just add ONE field, for the same reasons (how can I display data from 1 field, if there are, for example, dozens of services).

  • 2
    Go aside: "One-to-many communication." I think this is what you need. - Manitikyl
  • Thank you very much. It looks like this is what you need. But I didn’t even know how to call this in Google. - Pavel A.A.

0