|
- <?php
- /**
- * Created by PhpStorm.
- * User: Redstop
- * Date: 2016/8/16
- * Time: 11:57
- */
- header("Content-type:text/html;charset=utf-8");
- require_once __DIR__.'/../Common/Mysql.php';
- $current_time = date("Y-m-d H:i:s");
-
- $sell_line_array = array(449814,450737,449815);
-
- $sql = " SELECT DISTINCT(parent_order_id) FROM ORDER_MAIN WHERE parent_prod_id IN (".implode(",", $sell_line_array).") AND OUTSIDE_SALE_ORG_ID = 0 ";
-
- $pdo=conn1();
- $result=$pdo->query($sql);
- if( false == $result) {
- exit();
- }
- $rowset=$result->fetchAll();
- if( false == $rowset ) {
- exit();
- }
- $result->closeCursor();
-
- $order_id_array = array();
- foreach( $rowset as $row_info ) {
- $order_id_array[] = $row_info["parent_order_id"];
- }
-
- $update_sql = " UPDATE ORDER_MAIN SET OUTSIDE_SALE_ORG_ID=153 WHERE ORDER_ID IN(".implode(",",$order_id_array).") OR PARENT_ORDER_ID IN (".implode(",",$order_id_array).")";
- $pdo2=conn1();
- $pdo2->exec($update_sql);
-
-
-
-
-
-
|