Problems? Is your data what you think it is? | |
PerlMonks |
database query with POE::Wheel::Runby former33t (Scribe) |
on Aug 16, 2007 at 21:22 UTC ( [id://633174]=perlquestion: print w/replies, xml ) | Need Help?? |
former33t has asked for the wisdom of the Perl Monks concerning the following question:
I have an external program I am required to use to issue SQL statements to a database. The way the query works is that I issue a statement and when the result set changes, the program will dump back out to stdout. This keeps me from having to poll the database. I don't have direct access to the DB (that would be preferable) so I'm stuck with this.
The shell command looks like this: MyDbQueryProgram "SELECT * FROM MY_TABLE;" It runs fine from the command line, but I'm having a bear of a time getting it to work from POE. Any ideas on how to escape the string here? POE::Wheel::Run does a "sh -c" to run the command. Just running from the shell, this works: sh -c 'MyDbQueryProgram "SELECT * FROM MY_TABLE;"' Does anyone have any ideas? Thanks in advance for your help.
Back to
Seekers of Perl Wisdom
|
|