There is a request:
INSERT INTO orders (`date`, `dostavka_id`) VALUES (NOW(), $dostavka_id) In the orders table itself, besides date and dostavka_id , there is also a type . There is an info table with the same type . Actually the question is, how do I get the type out of the info table and write it in orders ?
I tried this:
INSERT INTO orders (`date`, `dostavka_id`) VALUES (NOW(), $dostavka_id) LEFT JOIN info ON (info.type = orders.type)
date,dostavka_idandtypefields so that thetypetaken frominfoand the other fields are set directly? Then you can try something like this:INSERT INTO orders (`date`, `dostavka_id`, `type`) SELECT NOW(), $dostavka_id, `type` FROM `orders`- BOPOHtype? "How to pull out the type from the info table and write it in orders" I showed (INSERT INTO .. SELECT `type` FROM...) But since this is not that, then at least you can give an example? Those. what is at the entrance, what should happen at the exit. - BOPOH