But read what I said: There is a very very good chance that you should be making only *ONE* SQL query there, *NOT* two!!!
Without seeing more of the page, I can't be sure, but I would give 3 to 1 odds, sight unseen.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.