shell + mysql

前端之家收集整理的这篇文章主要介绍了shell + mysql前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
#!/bin/bash echo "测试...................." MysqL="MysqL -h127.0.0.1 -P3306 -uroot -p123456 MysqLdb" selectMaxOrderId="select max(Forder_id) from t_order" cnt=$($MysqL -s -e "${selectMaxOrderId}") orderIds="${cnt}" #OLD_IFS="$IFS" #IFS=" " #max(Forder_id) 3013759 values=(${orderIds}) #IFS="$OLD_IFS" orderId=${values[0]} echo $orderId orderId=$[$orderId+1] echo $orderId placeOrder="INSERT INTO t_mytable VALUES ("$orderId");" echo $placeOrder $MysqL -e "$placeOrder" updateOrderStatus="update .......... set Fstatus=10 where Forder_id=$orderId;" $MysqL -e "$updateOrderStatus" extention="INSERT INTO ................" $MysqL -e "$extention" data='' url='127.0.0.1:80' curl -d "$data" "$url"
原文链接:https://www.f2er.com/bash/388957.html

猜你在找的Bash相关文章