Do I understand you correctly that you are trying to build and SQL statement on the fly? Something like this?
my $sql = 'SELECT * FROM costumers WHERE';
my @params;
if ($day eq 'Sunday') {
$sql .= ' date = ? ';
push @params, $date;
}
....
$sth = $dbh->prepare($sql);
$sth->execute(@params);
Could you give a bit more context?
regards
Gabor
_______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
