已经写好的语句:
startdate =
tb = 'ios_log_tb_' + startdate.strftime("%Y_%m_%d");
sql = "SELECT uuid, ctime from "+ tb
这个startdate该怎么写?
已经写好的语句:
startdate =
tb = 'ios_log_tb_' + startdate.strftime("%Y_%m_%d");
sql = "SELECT uuid, ctime from "+ tb
这个startdate该怎么写?
try:
conn = MySQLdb.connect(
host = "localhost",
user = "root",
passwd = "root",
#db = "dome"
)
cur = conn.cursor()
#获取mysql中所有数据库
cur.execute('SHOW DATABASES')
print(cur.fetchall())
获取到所有表后,判断表名是否包含currency,如果包含就放到集合里面,然后遍历集合查值