in reply to can one create a "session" of Perl & Mysql?
If you want to save the credentials for a future run of your script, you will have to have some mechanism for persistence of this data, perhaps in some table in different SQL master account? There are various security issues with this and of course you would have to handle the case where the user changes their credentials unbeknownst to your script. Perhaps other Monks have ideas on this. You could also leave your script running so the user could just keep it open in a window with a prompt for the next set of user values (without having to enter the login stuff again). I wanted to mention the place holder idea so that you can move some code out of the loop.
Update: still working on my morning coffee... Now that I re-consider this, I would re-organize the loop such that you can keep the script running in a separate window. User would exit by typing "quit", closing that window or whatever. This is an extra step for a single query, but easier for multiple queries and avoids complications with persistent storage of important security information.
|
|---|