How to win friends and influence people............
Read the posting guidelines. If your post doesn't (or didn't) get answered, ask yourself why.
Was your quesion confusing?
Was your query structured, succinct and to the point?
Would a potential assistant have to ask you further questions in order to give you a reply?
To be honest, my initial response to this thread was going to be a simple "YES" until I saw what you had posted in response to Barands perfectly legitimate response. We, ie the people who float round here trying to help genuine newcomers, are not an endless pot of time. Reading the same question under a different title from the same person with the same lack of context is a waste of time and puts those who would help off doing so. Just because you feel frustrated in the lack of hasty response does not legitimacise the second posting. All you need to do to push a thread back to the top is to post to the same thread again. Posting a new thread just serves to piss people off.
Anyway, to answer your question, yes it is possible. How you go about doing it depends upon what the second query is meant to achieve.
If you are simply collecting one row of data for each of your while() loops then it should be done using a "LEFT JOIN" within your primary query. If, however, you are looking for a subset of results which in turn will require a while() loop then do just that.
query
while() {
result_query
while() {
};
};