[snip] $sth = $dbh -> prepare ("SELECT expiration from newsgroups WHERE newsgroup='$group'"); $sth -> execute;
$group is a newsgroup name; all queries go fine, except one that has a dash in it. I have tried quoting $group, like: $newsgroup = $dbh -> quote ($group); $group, btw, where it goes wrong, is a recovery newsgroup called "alt.support.abuse-partners". I have had Perl quotemeta the whole thing, I haver dropped and added the single-quotes, I have used place-holders, etc. But I always get, "You have an error in your SQL syntax". [/snip] Have you tried double-quotes? '"$group"' ? Jay --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php