S
S
Simple912016-01-20 13:07:52
PHP
Simple91, 2016-01-20 13:07:52

Rewriting temporary table to Mysql permanent?

Hi all!
The help of knowledgeable people about mysql is required.
The situation is as follows:
There is a form on the site where I enter the order data:
[ Goods: ball
Where to take: Lenina 99
Cost: 200 rubles
]
Until this order is completed, I store it in a temporary table in mysql: temp_orders. Then, the order is fulfilled or not fulfilled, and it needs to be resaved to the archive_orders_do table if the order was completed and I write it down to who completed the time, etc., or to the archive_orders_dont table if the order was not completed during the day.
Question
My question is, is this the correct implementation approach? and how it is possible to overwrite this order in the archive_orders(do/dont) tables after the order has been deleted from the temporary table.
If possible, with some example, thanks!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2016-01-20
@Simple91

You can not drag orders across tables, but store them in one.
You need to add the fields [who completed], [time]
You will get that if they did not complete, then [time] is NULL
Writing a query to select all those who did not complete for the previous days is not difficult.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question