shell + mysql

前端之家收集整理的这篇文章主要介绍了shell + mysql前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
#!/bin/bash echo "测试...................." @R_502_198@="@R_502_198@ -h127.0.0.1 -P3306 -uroot -p123456 @R_502_198@db" selectMaxOrderId="select max(Forder_id) from t_order" cnt=$($@R_502_198@ -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 $@R_502_198@ -e "$placeOrder" updateOrderStatus="update .......... set Fstatus=10 where Forder_id=$orderId;" $@R_502_198@ -e "$updateOrderStatus" extention="INSERT INTO ................" $@R_502_198@ -e "$extention" data='' url='127.0.0.1:80' curl -d "$data" "$url"

猜你在找的Bash相关文章