Re: choose from a list

2007-11-01 Thread sandipm
one more way of connecting to sql. MySQLdb.connect(client_flag=65536131072,cursorclass=cursors.DictCursor,host=HOST,port=3306,user=USER,passwd=PASSWD,db=DbName) cursor = conn.cursor() in your case, only list of dictiories will be returned but when query/stored procedure returns more than one

Re: choose from a list

2007-11-01 Thread [EMAIL PROTECTED]
On Nov 1, 11:54 am, barronmo <[EMAIL PROTECTED]> wrote: > This is really remarkable. My previous experience with programming > was in VB for Applications; doing the same thing seemed much more > complicated. This little function is only about 15 lines of code and > it forms the basis for my entir

Re: choose from a list

2007-11-01 Thread barronmo
This is really remarkable. My previous experience with programming was in VB for Applications; doing the same thing seemed much more complicated. This little function is only about 15 lines of code and it forms the basis for my entire application. With a few simple modifications I'll be able to

Re: choose from a list

2007-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 7:39?pm, barronmo <[EMAIL PROTECTED]> wrote: > I didn't know "result" was a list! I don't use MySQL but that's how others work. Each list item is a record, each record a tuple of field values. > Can all that info be stored in a list? If you don't fetch too many records at once. Th

Re: choose from a list

2007-10-30 Thread barronmo
I didn't know "result" was a list! Can all that info be stored in a list? How do the columns work? I was curious to see what the data looked like but I can't seem to print "result" from the prompt. Do variables used inside functions live or die once the function executes? If they die, how do I

Re: choose from a list

2007-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 5:08 pm, barronmo <[EMAIL PROTECTED]> wrote: > Thanks to both of you for the help. I made several of the changes you > suggested and am getting the results in the format I want, eg: > > 0 387 John Smith > 1 453 Jane Smith > 2 975 Joe Smithton > > My plan at this point is, in addit

Re: choose from a list

2007-10-30 Thread barronmo
Thanks to both of you for the help. I made several of the changes you suggested and am getting the results in the format I want, eg: 0 387 John Smith 1 453 Jane Smith 2 975 Joe Smithton My plan at this point is, in addition to printing the results of the query, to create a list with a matc

Re: choose from a list

2007-10-30 Thread Bruno Desthuilliers
barronmo a écrit : > I'm new to programming and even newer to Python and would be grateful > for some help on what has been a tough problem for me. The project I > am working on is an electronic medical record using MySQL/Python. I'm > currrently working on a module that looks up a patient's name

Re: choose from a list

2007-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 1:03 pm, barronmo <[EMAIL PROTECTED]> wrote: > I'm new to programming and even newer to Python and would be grateful > for some help on what has been a tough problem for me. The project I > am working on is an electronic medical record using MySQL/Python. I'm > currrently working on a

choose from a list

2007-10-30 Thread barronmo
I'm new to programming and even newer to Python and would be grateful for some help on what has been a tough problem for me. The project I am working on is an electronic medical record using MySQL/Python. I'm currrently working on a module that looks up a patient's name based on input from the us