D
D
Dmitry2017-05-09 17:24:52
PHP
Dmitry, 2017-05-09 17:24:52

How, after entering data into the fields of two tables, to transfer the id of these fields to the third table?

There are three tables:
f293f36aba174e25b1b736e20bab65f3.png
Logic:
When checking into a hotel, all fields in all three tables are filled in, but you need to do something like this:

  • information about the payment is sent to the table payments, and id_paymentthis payment is sent toaccommodation
  • information about the new guest is sent to the table clients, and id_clientthis guest is sent toaccommodation

Those. in fact, you need to take the data, write it to tables, and then enter the id-shniks of this data into the table accommodation.
How is this implemented?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question