TypeError: unsupported operand type(s) for +: 'int' and 'str' [closed]

 

sql="insert into auto_transfer_data(atd_type,atd_mogodb_count,atd_mysql_before_count,atd_create_date)values('"+at_type+"','"+str(mongodbcount)+"','"+str(mysql_before_count)+"','"+currentDate+"')"

解决办法 类型转换
int转成string,函数str(number)
string转成int,函数int(string)

 

posted on 2017-04-01 17:31  智华  阅读(5694)  评论(0编辑  收藏  举报