in reply to Mysql Select Query by Perl
In SQL, you need to quote strings, otherwise they'll be interpreted as column names and such. That's what the warning is trying to tell you. I see you're trying to properly quote the table name and column, but you're failing to quote the value. Try the quote() method.
Frequently, you'll find that using placeholders will give you more robust code, so you may want to learn to use them. It's certainly no harder than building the SQL strings yourself, and less likely to fail. The only problem in this case is that you can't pass in an identifier (at least for the databases I typically use).
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Mysql Select Query by Perl
by endymion (Acolyte) on Jun 22, 2012 at 12:11 UTC | |
by aaron_baugher (Curate) on Jun 22, 2012 at 12:41 UTC | |
by endymion (Acolyte) on Jun 22, 2012 at 13:08 UTC |