title: Count SQLite Android how to display cursor properly
body: <p>I have a simple function with SQLite raw query, it looks like :</p>
  
  <pre><code>public Cursor getOccurations ()
  {
      SQLiteDatabase db =this.getWritableDatabase();
      Cursor data= db.rawQuery("select count(*) from Beacon_occurations where BEACON_ADDRESS='" + COL_2 + "' and TIME='" + COL_3 +"'", null);
      return data;
  }
  </code></pre>
  
  <p>And now here is a question, how should I display it properly ? When I try do something like :</p>
  
  <pre><code>            data = db.getOccurations();
              string = data.toString();
              Log.e("Message",string);
  </code></pre>
  
  <p>I get : <strong>Message: android.database.sqlite.SQLiteCursor@1a81ae97</strong> ofc it isn't data which I want get :)
  How should I do it properly ?</p>