Hello, I have to register the sales made in two tables, (Sale and Item Sales).
In the sales table I have the id, codclient, date and total fields.
In the itemvenda table I have the fields id, codvenda, quant, price.
My question is how to get the contents of the id field from the sales table, and save it in the codvenda field of the itemvenda table, since both are recorded simultaneously in the act of issuing the boleto bancário.
If friends can give me a light in this doubt, I will be very grateful.
I'm using mysql and php.
Thank you for the attention of your friends.