Last active
August 12, 2021 07:00
-
-
Save bgogul/e5904ddf010341a26d9a547fe4aa10c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import mysql.connector | |
# mydb = mysql.connector.connect( | |
# host="localhost", | |
# user="myusername", | |
# password="mypassword", | |
# database="mydatabase" | |
# ) | |
# mycursor = mydb.cursor() | |
# sql = "SELECT * FROM customers WHERE address = 'Park Lane 38'" | |
# mycursor.execute(sql) | |
# myresult = mycursor.fetchall() | |
# for x in myresult: | |
# print(x) | |
customers = sqldb("mydatabase") | |
# Following gets staged and when needed converted to sql query to get data | |
# "SELECT * FROM customers WHERE address = 'Park Lane 38'" | |
[print (x) for x in customers if f.address = `Park Lane 38'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment