names = [item["name"] for item in data["organizations"]]
leaders_name = [item["leader_name"] for item in data["organizations"]]
leader_discord_id = [item["leader_discord_id"] for item in data["organizations"]]
leader_vk = [item["leader_vk"] for item in data["organizations"]]
x = {
'name': names,
'leader_name': leaders_name,
'leader_discord_id': leader_discord_id,
'leader_vk': leader_vk
}
mydb = mysql.connector.connect(
host="",
user="",
password="",
database="s424_illegals",
)
self.mycursor = self.mydb.cursor()
self.mycursor = self.mydb.cursor(buffered=True)
self.mycursor = self.mydb.cursor(dictionary=True)
curs = mydb.cursor()
curs = mydb.cursor(buffered=True)
sqlFormula = 'INSERT INTO testdb (name) VALUES (%s)'
id1 = ()
curs.execute(sqlFormula, id1)
1 个回答