"be consistent" | |
PerlMonks |
Re: Escaping single quotes and DBIby ezekiel (Pilgrim) |
on Sep 06, 2001 at 11:37 UTC ( [id://110516]=note: print w/replies, xml ) | Need Help?? |
Thanks for the pointers, I solved the problem by familiarizing myself with the quote method. However, I'd like to explore the placeholder stuff. On seeing the responses I asked myself the same question: why am I not using placeholders? To explain I have to expand the example slightly. Imagine it reads:
This works fine with MySQL as the database, but I am also using the same code with DB2. It seems DBI quotes the $id integer. DB2 therefore thinks it is a string and refuses to insert it because the column takes integers. I'll keep working my way through the DBI docs, but does anyone know why this should be the case? or a way around it? Thanks again
In Section
Seekers of Perl Wisdom
|
|