in reply to If Problem!!!
A few comments:
my $sql = <<__END_SQL__; SELECT DISTINCT name FROM master WHERE name LIKE ? ORDER BY name __END_SQL__ # stuff here $sth->execute("%${company}%"); # more stuff here
As for your actual problem, I would argue that you haven't through through what you want to do. I would build a list of $ag values within the while-loop. Then, outside the while-loop, I would check to see if you have any $ag values. If you don't, put your "Value not found" select. Otherwise, build the selects.
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|