For an app I am developing I need to run some sql queries and I have the infrastructure all set up and I can run single queries, but my question was, what is the best way to run, lets say 15 SELECT queries. My current query method is going from android ASyncTask then calling a php script and then getting the inputstream. I currently get null errors on the returned array because I am trying to run it in a loop and I need that structure because the number of runs is user defined.
Asked
Active
Viewed 147 times
1 Answers
0
It would be best practice to get all of the data that you need from the PHP script all at once (providing the data is relatively small), and then run all of the queries.
If you mean to do the queries locally on the android, then I would suggest you use SQLite transactions, as explained here