Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 30th, 2012  |  syntax: None  |  size: 0.43 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Android: SQLite find data
  2. Cursor cur = sampleDB.rawQuery("SELECT * FROM " + Constants.TABLE_NAME,
  3.                 null);
  4.  
  5.         if (cur= null) {
  6.  
  7.             if (cur.moveToFirst()) {
  8.                 do {
  9.  
  10.                  String title = cur.getString(cur.getColumnIndex("Title"));
  11.                  // "Title" is the field name(column) of the Table                
  12.  
  13.                 } while (cur.moveToNext());
  14.             }
  15.         }