in reply to SQL causing 500 error (was: What's Wrong With This?)

Try:
my $sth = $dbh->prepare(<<SQL) or die $dbh->errstr; select count(*) from userlist where colemail = '$FORM{'email'}'; SQL $sth->execute;

--nutshell

Replies are listed 'Best First'.
Re: Re: What's Wrong With This?
by Anonymous Monk on Oct 07, 2002 at 05:59 UTC
    you need to use: $sth->do( SQL STATEMENT HERE ); for one liners and $SQL = " SQL STATEMENT HERE "; $sth->prepare($SQL); for statements you want to prepare and execute over and over again.