H
Huub
Hi,
I want to compare a variable with 1, but the code after "if" is executed
anyway. This is the code immediately before "if":
$bezorger = "select bezorger from hvw where lidnr = $record";
$sth = $dbh->prepare($bezorger);
$sth->execute or die "SQL Error: $DBI::errstr\n";
@bezorger = $sth->fetchrow_array;
print "Record: $record\n";
print "Bezorger: @bezorger\n";
# $bezorger = @bezorger;
if (@bezorger == 1)
{
I did "if ($bezorger == 1)" and "if (@bezorger == 1)" but neither seems
to work. Do I miss something?
Thanks,
Huub
I want to compare a variable with 1, but the code after "if" is executed
anyway. This is the code immediately before "if":
$bezorger = "select bezorger from hvw where lidnr = $record";
$sth = $dbh->prepare($bezorger);
$sth->execute or die "SQL Error: $DBI::errstr\n";
@bezorger = $sth->fetchrow_array;
print "Record: $record\n";
print "Bezorger: @bezorger\n";
# $bezorger = @bezorger;
if (@bezorger == 1)
{
I did "if ($bezorger == 1)" and "if (@bezorger == 1)" but neither seems
to work. Do I miss something?
Thanks,
Huub