Well there are alot of way you could accomplish this. Here is one.
- Write a backend in PHP (or the language of your choice) to run SQL queries and then take that data and serialize it into JSON.
- Then in the Android app request the Url of the PHP file.
- Use GSON or another JSON parser to parse the JSON into objects.
- Display the object on App (List, Map ...)
If you are having trouble with the Android side of it I would recommend looking at some documentation.
EDIT
Code for building a url using a map where the keys are the get parameters and the values are the value of the get parameters.
if (vars != null) {
Iterator<String> itr = vars.keySet().iterator();
boolean first = true;
// Append them to the url
while (itr.hasNext()) {
String key = itr.next();
if (first) {
builder.append("?" + key + "=" + vars.get(key));
first = false;
} else {
builder.append("&" + key + "=" + vars.get(key));
}
}
}
builder.toString();