> # $title = $2;
>> $values = join ",", $dbh->quote($Description),
> $dbh->quote(substr($Description, 0, 50)), $dbh->quote($2),
> $dbh->quote($Keywords), $dbh->quote($UnixPath),
> $dbh->quote($MacPath), $dbh->quote($Volume);
>> $dbh->do("INSERT INTO $table $Fields VALUES ($values)");
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);
This gets around the need to mess around with quoting things all over the
place. Will this work around your problem? (I haven't tested it).
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!