title: Fetching values from cursor in android
body: <p>i am fetching a query from sqlite database like that :</p>
  
  <pre><code>String query = "select distinct(" +MessageCountConstant.To_USER + "), sum(" +MessageCountConstant.SEND_MESSAGE_COUNT + ") , "
              + "sum(" +MessageCountConstant.RECIEVE_MESSAGE_COUNT + ") from " +TABLE_NAME + " where " + MessageCountConstant.DATE  + "= " +date
               + " AND "+ MessageCountConstant.DATE  + " &gt;= "+previousDate + " AND "+ MessageCountConstant.JID + " = '"+ Uname + "'"
                          ;
  
  
      SQLiteDatabase db = mOpenHelper.getReadableDatabase();
      cursor = db.rawQuery(query, null);
  </code></pre>
  
  <p>Now can anyone tell me how can i fetch value from cursor .Thanks in advance.</p>