def getRecordsMySQL(query): """gets data from appopriate mysql database""" password = private_data.mysql_pass() # gets pass from module conn = MySQLdb.connect(host = "localhost", user = "******", passwd = password, db = "anolis_msats") cur = conn.cursor() cur.execute(query) return cur.fetchall()
def getRecordsMySQL(): """gets data from appopriate mysql database""" password = private_data.mysql_pass() # gets pass from module conn = MySQLdb.connect(host="localhost", user="******", passwd=password, db="anolis_msats") cur = conn.cursor() cur.execute( """select a.scaffold_id, a.start, a.stop from anocar1 as a, locus as l where a.locus_id = l.id and a.scaffold_id = 1 and l.type = 'tetra' """ ) return cur.fetchall()