title: Fetch data from database to display in a listview using Parse.com
body: <p>I want to display specific data in a listview from a database's column using parse.com, i just don't know how to specifically do that,following is the code there is an error here but you can change it completely to solve it !</p>
  
  <p>public class Donar_Acceptor_list extends ListActivity {</p>
  
  <pre><code>// Declare Variables
  ListView listview;
  List&lt;ParseObject&gt; ob;
  </code></pre>
  
  <p>// ProgressDialog mProgressDialog;
      ArrayAdapter adapter;</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      // Get the view from listview_main.xml
      setContentView(R.layout.donar_acceptor_list);
      // Execute RemoteDataTask AsyncTask
     // new RemoteDataTask().execute();
  }
  
  protected Void doInBackground(Void... params) throws com.parse.ParseException {
          // Locate the class table named "Country" in Parse.com
          ParseQuery&lt;ParseObject&gt; query = ParseQuery.getQuery("DonAcc");
          query.whereEqualTo("DonAcc", "donar");
         // ParseQuery&lt;ParseObject&gt; query = new ParseQuery&lt;ParseObject&gt;(
          //        "username");
          query.orderByDescending("_created_at");
          try {
              ob = query.find();
          } catch (ParseException e) {
              Log.e("Error", e.getMessage());
              e.printStackTrace();
          }
          return null;
      }
      protected void onPostExecute(Void result) {
          // Locate the listview in listview_main.xml
          listview = (ListView) findViewById(R.id.list);
          // Pass the results into an ArrayAdapter
          adapter = new ArrayAdapter&lt;String&gt;(Donar_Acceptor_list.this,
                  R.layout.donar_aceptor_discription);
          // Retrieve object "name" from Parse.com database
          for (ParseObject status : ob) {
              adapter.add((String) status.get("name"));
          } 
         listview.setAdapter(adapter); } }
  </code></pre>