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

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.

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