On Sat, 18 May 2002, Michael Fowler wrote:
> Given your code above, that isn't the problem.  Where they're declared has
> no effect on the definedness; it does, however, cause compile-time errors
> when use strict is in effect.  That is not the problem you were
> encountering, though.  The variables are undefined for a very simple reason:
> you never assigned a value to them.

I could have sworn that I gave them values... Hm. That bit of code is gone 
now.

> Instead of using DBI's quote method use placeholders:
>     $dbh->do(
>         "INSERT INTO $dbfile ($column_names) VALUES (?, ?, ?)",
>         {},
>         $age, $name, $phone
>     );
> It saves most of your work.  See perldoc DBI.

The quoting is necessary because many of the values that are stored 
contain white-space and punctuation. Thanks for the tip, though.

-- 
Eric P.
Los Gatos, CA


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to