Re-match the Order details of a product without renewal because the product is not downloaded. Once again, the MySQL update and delete scripts have many restrictions, which embarrass the unqualified programmers.
Create Table tmp201409162227 as select L. po_line_id, PT. product_code from trade T, po_header P, po_line L, product PT where T. shop_id = 3456 and T. pay_time> = '2017-09-16 00:00:00 'and T. pay_time <= '2014-09-16 23:59:59 'and T. trade_id = P. trade_id and P. po_header_id = L. po_header_id and L. num_iid = pt. num_iid and (t. trade_status = 'wait _ buyer_confirm_goods 'or T. trade_status = 'wait _ seller_send_goods ') and L. product_code = ''; update po_line lll set lll. product_code = (select TM. product_code from tmp201409162227 TM where TM. po_line_id = lll. po_line_id) Where lll. po_line_id in (select TT. po_line_id from tmp201409162227 TT );
Rematch ORDER item renewal