成都创新互联网站制作重庆分公司

MySQL的sql语句取shell程序中的forin多变量一例

#!/bin/bash
a=(`cat time.txt`)
b=(`cat sum.txt`)
for (( i = 0; i < 38; i++))
do
/bin/MySQL -u test -p'test' -h localhost -P 3306 <update billing.test set scan_first_sum='${b[$i]}' where project='zjpj' and date='${a[$i]}';
select * from chenfeng.test where project='zjpj' and date='${a[$i]}' and scan_first_sum='${b[$i]}';
EOF
done
#echo ${a[$i]} ${b[$i]}


本文名称:MySQL的sql语句取shell程序中的forin多变量一例
文章分享:http://cxhlcq.com/article/giphce.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部