Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python mysqldb

import MySQLdb

db = MySQLdb.connect(db=dbname, host=dbhost, user=dbuser, passwd=dbpass)

cursor = db.cursor()
cursor.execute("SELECT NOW();")

d = cursor.fetchone()
print("Now: ", d[0])

db.close()
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #python #mysqldb
ADD COMMENT
Topic
Name
3+4 =