I need a function that waits until the db is not empty.

thank you Yisrael I supposed that. I will request it! cheers