i have been using sqlite, phonegap, javascript and i m in need of fetching information from the sqlite db.

I am able to fetch all info i need, insert, update, etc.

The problem is javascript works asynchronously. That is it is processing all other succeeding statements before all the necessary info from database gets fetched.

i have tried using callbacks all along and i am tired of it since there are difficulty in using loops. (not able to use sqlite queries within loops since loop gets iterated before the current sqlquery gets processed which is not what i want)

is it possible to do these db operations synchronously?

**UPDATE**
Found out a new solution from here: [webkit executesql sentence and loop problem](https://stackoverflow.com/questions/6492564/webkit-executesql-sentence-and-loop-problem/14394809#14394809)