> I can't think of the con's and the pro's of keeping open
> the mysql connection when the script starts and close
> it when it ends..
The reasoning is that you want to open the connection at
the start of a script do all your processing then close it.
In between you might want to add data, cre
Hello,
Thank you for the reply. You can browse the entire script code[1]. The
truth is that I did not think about it. The speed is acceptable for
me, but as you point you out, it does not make much sense.
I can't think of the con's and the pro's of keeping open the mysql
connection when the script
def sql_listusers(hostname, dbusername, dbpassword, dbbase, dbasename):
try:
conn = MySQLdb.connect (host = hostname,
user = dbusername,
passwd = dbpassword,
db = dbbase)
cursor = conn.cursor ()
cursor.execute
Hello,
This is a snip of my code:
def sql_listusers(hostname, dbusername, dbpassword, dbbase, dbasename):
try:
conn = MySQLdb.connect (host = hostname,
user = dbusername,
passwd = dbpassword,
db = dbbase)
cursor