1
Hello, I have to register the sales made in two tables, (Sale and Itemvenda).
In the sales table I have the fields id, codcliente, datavenda e total.
In the table itemvenda have the fields id, codvenda, Quant, price.
My question is how to take the content of the id field of the sale table, and record it in the itemvenda table codvenda field, since both are recorded simultaneously at the time of the bank bill issuance.
If friends could shed some light on my doubt, I’d be most grateful.
I’m using mysql and php.
Grateful for the attention of friends.
does a precedent for this, where it writes to table A, picks up the id and then will insert in table B already with the id of the first Insert.
– RBoschini
is using POO?
– Raylan Soares