For persistance I would suggest to use my last example where you query for how many rows the result holds, there you will not try to fetch any befor they need to be used.
Thus keeping every bit of info stored in your $rsltTEST untill needed, no matter if the result is NILL or more.
But what the hell, I'm drunk now, and it works
