my @compile=param ('compile'); my $dbh=DBI->connect($dsn,$user,$password,) or die "Error $DBI:: error connecting to $dsn"; my $sth=$dbh->prepare("SELECT * FROM ddts WHERE `Stat`=\"T\" AND `Project`=\"Def\" AND `Version`=\"@version\""); $sth->execute(); print ""; while (my ($identifier)=$sth->fetchrow_array ) { foreach $elem(@compile){if ($elem eq $identifier){ print "
1696
";#I want to print this only if there is smth in the database print "";}}} print "
$identifier
"; $sth->finish;