批量插入数据 mysql
时间:2021-07-01 10:21:17
帮助过:3人阅读
"
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 = "";
}
}
批量插入数据 mysql
标签:bsp val pre ber font sql color date() exec