$sql = "INSERT INTO `fenqi`.`sdfq_customer_order` ( `order_sn`,order_status,customer_id,remark,price,need_price,create_time,fenqi_type_id,fenqi_num_id,buiness_area_id )VALUES"; $sqle = ""; for ($i = 20001; $i <= 40000; $i++) { $sqle .= "(‘" . setOrderNumber() . "‘,2,$i,‘ramark" . $i . "‘,20000,20000,‘" . fqdate() . "‘,4,7,270),"; // $sql = substr($sql, 0, strlen($sql) - 1); if ($i % 1000 == 0) { $sqle = rtrim($sqle, ","); $dosql = $sql . $sqle; Db::execute($dosql); $sqle = ""; } }
时间: 2024-10-29 02:01:24