dblist = ('database1', 'database2', 'database3', 'database4', 'database5', 'database6', 'database7')
for db in dblist:
cursor = conn.cursor()
cursor.execute("select SYSTEM from automation/awdclient where db = " + "'" + db + "'" + "")
for row in cursor:
activesystem.db = row[0]
cursor.close
conn.close
print activesystem.database1
print activesystem.database2
我要做的是从数据库中检索系统名。我想分配一个与系统名相等的变量,用变量名系统。随便数据库字符串是。在
使用:
相关问题 更多 >
编程相关推荐