一.环境 mac OS + python3.6 + pymysql 二.执行 1.语句 select count(user_id) from chezhubangapppp.yfq_user where register_dt between '2018-11-01' and '2018-12-01'; 写成这样直接会报错,说between and之间必须是时间类型 2.修改后 "select count(user_id) from chezhubangapppp.yfq_user where…
info_rent = MysqlUtils.select_yezhu_rent() info_sale = MysqlUtils.select_yezhu_sale() now_time = datetime.datetime.now() #now time type is datetime and mysql spidertime is also datetime for i in info_rent: city = i[0] spidertime = i[1] d_time = now_t…