MySQL的sql语句取shell程序中的forin多变量一例-成都快上网建站

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://kswjz.com/article/giphce.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流