in reply to Query twice
When you execute the second query, you implicitly "finish" the prior result set. This isn't what you want to do.
If you must, use two connections.
Switching to DBI might give you more flexibility.