【发布时间】:2014-03-17 07:45:49
【问题描述】:
使用此代码:
current_time=time.localtime()
time_now=time.strftime('%H:%M:%S',current_time)
cursor.execute("Select * from SUBSCRIPTION_DETAILS where Alert_time='%s'") % time_now
我得到错误:
unsupported operand type(s) for %:long and str
Alert_time 中的type 是 varchar
【问题讨论】:
-
您好,欢迎您。有时需要一段时间才能有人有时间回答您的问题,可能是几个小时,甚至可能是几天。耐心点! 5 分钟后再次询问通常被认为不是很友好:-)
标签: python-2.7 mysql-python typeerror