let's see... if you get data from the database, and it's empty... then you display it on the screen, it's still empty... so what gets displayed... nothing! problem solved!
sorry for the sarcasm, it's just that your question is so vague, incoherent, and broad, that i can't answer in any serious way.