in reply to MySQL INSERT in Perl
Did you "use strict;" ? It seems like $ins_rec may have gone out of scope by the time you called the "prepare".
Also, I acknowledge the excellent suggestions by others to use placeholders, to avoid sql-injection, as well as better ways to compose the query.
If you use the perl debugger, you could step you way to right before the prepare, and view the content of $ins_rec, at that point.
"XML is like violence: if it doesn't solve your problem, use more."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: MySQL INSERT in Perl
by baperl (Sexton) on Aug 04, 2011 at 14:45 UTC | |
by NetWallah (Canon) on Aug 04, 2011 at 17:46 UTC | |
by baperl (Sexton) on Aug 04, 2011 at 17:55 UTC | |
by afoken (Chancellor) on Aug 04, 2011 at 19:40 UTC |