Re: Python Database Scripts

2005-09-14 Thread Simon Brunning
On 13 Sep 2005 11:32:05 -0700, Chuck <[EMAIL PROTECTED]> wrote: > BTW, where is the DB-API docs for python? Google is your friend - , 1st hit. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mail

Re: Python Database Scripts

2005-09-13 Thread Chuck
Hi, thanks for (all) of your help. BTW, where is the DB-API docs for python? Thanks, --Chuck -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Database Scripts

2005-09-12 Thread jegenye2001
Well, for a single connection object you could use several cursor objects and juggle with all of them in your program. This can come in handy if it's not about a simple script like I put in here. You can reuse the results from the cursors, etc. without issuing more, potentially resource-hungry,

Re: Python Database Scripts

2005-09-12 Thread ncf
Hmm...sorry to go a little off topic here, but I, also, have been striving to learn Python/MySQL for a while using MySQL's official thing. Can you please explain to me why one must use a cursor and can't just do an execute on the connction? :confused about the subject: -- http://mail.python.org/m

Re: Python Database Scripts

2005-09-12 Thread jegenye2001
import MySQLdb # Create a connection object and create a cursor conn = MySQLdb.Connect(host="localhost", port=3306, user="mysql", passwd="pwd123", db="mytest") c = conn.cursor() # execute some SQL c.execute("SELECT * FROM mystuff") # Fetch all results from the cursor into a sequence results = c

Re: Python Database Scripts

2005-09-12 Thread Peter Decker
On 12 Sep 2005 08:28:39 -0700, Chuck > Can anyone provide any kind of python database (mysql) code or point me > to a link that has this? Just simple things as maybe using a driver, > opening up a db, an insert and select. Any help would be greatly > appreciated! It might be more than you're l

Python Database Scripts

2005-09-12 Thread Chuck
Hello, Can anyone provide any kind of python database (mysql) code or point me to a link that has this? Just simple things as maybe using a driver, opening up a db, an insert and select. Any help would be greatly appreciated! Thanks, --Chuck -- http://mail.python.org/mailman/listinfo/python-l