> > On a stylistic point, the recommended way to do this sort of thing is:
> >
> > $sth = $dbh->prepare("INSERT INTO $table $Fields VALUES (?,?,?,?,?,?,?)");
> > $sth->execute( $Description, substr($Description, 0, 50),
> > $2, $Keywords, $UnixPath, $MacPath, $Volume);
>> I tried using this syntax at some stage but had some kind of problem with it
> and didn't keep trying. However,
Really? What sort of problems did you have?
> > This gets around the need to mess around with quoting things all over the
> > place.
>> I'm not sure that this is right. DBI->quote is to quote strings being passed
> to the server. I don't see how passing them via these bound parameters
> gets around this necessity.
I phrased that badly. What I meant to say was "This gets around the need to
_explicitely_ quote things all over the place". It's simply a neater
interface than messing around with DBI->quote, but does the same thing by
FETCH'ing them from within the execute() code, rather than by passing them
directly to do() and then execute().
Your problem is curious though. I've looked at the XS code for quote() and
execute() but rapidly got lost in there (must dig out my perl internals book
one of these days).
Nick
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!