MySQL Forums
Forum List  »  Connector/Python

Re: Can you make the number of select variable?
Posted by: Tobin Cataldo
Date: May 04, 2006 03:32PM

Probably a loop
http://diveintopython.org/file_handling/for_loops.html

after reading standard in
http://diveintopython.org/scripts_and_streams/stdin_stdout_stderr.html

In short this is how I would do it...

in the main method
get user input (n)
run the loop (n times)
while in loop - construct sql as string (could either variable strings or run the same sql n times)

initiate a db class that takes sql string as argument returns object (or object pointer)
get back object


tobin

Options: ReplyQuote


Subject
Written By
Posted
Re: Can you make the number of select variable?
May 04, 2006 03:32PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.