Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
First, you have to the mysql.connector
. If you’re uncertain of the best way to get this setup, seek advice from The way to Set up MySQL Driver in Python.
import mysql.connector
mydb = mysql.connector.join(
host = "localhost",
person = "username",
password = "YoUrPaSsWoRd",
database = "your_database"
)
mycursor = mydb.cursor()
mycursor.execute("SELECT * FROM prospects LIMIT 10")
myresult = mycursor.fetchall()
for x in myresult:
print(x)
import mysql.connector
mydb = mysql.connector.join(
host = "localhost",
person = "username",
password = "YoUrPaSsWoRd",
database = "your_database"
)
mycursor = mydb.cursor()
mycursor.execute("SELECT * FROM prospects LIMIT 10 OFFSET 5")
myresult = mycursor.fetchall()
for x in myresult:
print(x)