On Wed, Dec 11, 2013 at 1:56 AM, Lars Noodén <lars.noo...@gmail.com> wrote: > my $sth = $dbh->prepare("delete from sessions where \ > current_timestamp - time > interval ?"); > > $sth->execute( $interval ); > > > What mistake is there causing the error? I can use a similar line with > a placeholder for a SELECT sql statement without error.
The DBI docs say (here = http://search.cpan.org/~timb/DBI/DBI.pm#Placeholders_and_Bind_Values): "With most drivers, placeholders can't be used for any element of a statement that would prevent the database server from validating the statement and creating a query execution plan for it." I suspect you're running afoul of that... j. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/