On Sat, May 18, 2002 at 01:05:57AM +0800, [EMAIL PROTECTED] wrote:
> On Sat, 18 May 2002, Michael Fowler wrote:
> > 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.
You misunderstand placeholders, and my suggestion. Perhaps a review of
perldoc DBI is in order. The values inserted by the placeholders are quoted
exactly the same way DBI->quote would quote them.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]