#!/bin/bash
ip=$1
act_id=$2
start_time=$3
end_time=$4
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
DBNAME="redpacket"
TABLENAME="redpacket_activity"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"

function doMysql()
{
	#更新loan_application_history表中的is_active=0
	update_sql="update ${TABLENAME} set activity_starttime=\"$start_time\", activity_endtime=\"$end_time\"  where id=${act_id}"
	echo ` mysql $mysqld ${DBNAME} -e "${update_sql}"`

}

doMysql
