title: Sqlite how to get string items using cursor
body: <pre class="lang-java prettyprint-override"><code>public Cursor getImages(long rowId) throws SQLException
  {
      Cursor mCursor =
              db.rawQuery(&quot;select * from Pictures WHERE id=&quot; + rowId + &quot;;&quot;, null);
      if (mCursor != null) {
          mCursor.moveToFirst();
      }
      return mCursor;
  }
  </code></pre>
  <p>Table columns &quot;id, pic, comment&quot;</p>
  <p>I want to take values of pic &amp; comment to string array.</p>
  <p>My code is:</p>
  <pre class="lang-java prettyprint-override"><code>int i=0;
  Cursor c1 = db.getImages(memberId);     
  c1.moveToFirst();
  while(c1.isLast()){
      pictures[i]=c1.getString(1);
      comments[i]=c1.getString(2);
      i++;
  }
  </code></pre>
  <p>this not working.</p>