on Sun, 22 Sep 2002 17:53:29 GMT, Wiggins D'Anconia wrote:

> larry lefthook wrote:
>> my $sth = $dbh->prepare('delete from cl_items WHERE date_time < 
>> $exp_time2 ');
>> 
> 
> You are single quoting your statement which means $exp_time2 is taken 
> literally rather than interpolated should be:
> 
> my $sth = $dbh->prepare("delete from cl_items WHERE date_time < 
> $exp_time2 ");
> 
>> $sth->execute();

Or (even better :-), use a placeholder:

    my $sth = $dbh->prepare('delete from cl_items WHERE date_time < ?');
    $sth->execute($exp_time2);

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to