in reply to Multiple DB Queries using DBI

If this is a web app run on apache, you might also look into Apache DBI. It's got some tasty bits.