in reply to Perl - MySQL query question
you probably want to combine your two queries into a single one: