问题:将sql语句从mysql复制到python,报错 ValueError: unsupported format character ''' (0x27) at index 224
sql = "select concat(round(bid_rate*100,2),'%') as bid_rate from platform_bid_day where section BETWEEN '%s' and '%s' ORDER BY section " % (st,et)
解决:将%换成%%,如下
sql = "select concat(round(bid_rate*100,2),'%%') as bid_rate from platform_bid_day where section BETWEEN '%s' and '%s' ORDER BY section " % (st,et)