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
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
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
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
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
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
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
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
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
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
10 matches
Mail list logo