title: row id from database
body: <p>i am trying to do a query of my database for a string lets call it "Test" and then find out what row that particular string is in and save that number to use. I thought i had this figured out before but now it is not working for some reason and i get an error saying no such column "Test". </p>
  
  <p>here is my code</p>
  
  <pre><code>public String getRow(String value){
  
      ContactDB db = new ContactDB(this);
      db.open();
      Cursor curs = db.getId(value);
      String test = curs.getString(curs.getColumnIndex(db.NAME));
      curs.close();
      Log.v("Contact", "Row ID: " + test);
      db.close();
      return test;
  }
  </code></pre>
  
  <p>"Test" is sent into that as value</p>
  
  <p>this is in my database</p>
  
  <pre><code>//---retrieve contact id---
  public Cursor getId(String where){
      Cursor c = db.query(DATABASE_TABLE, new String[] {ID},where,null,null,null,null);
      if (c != null) 
          c.moveToFirst();
      return c;
  }
  </code></pre>
  
  <p>i dont remember changing anything from when i first tested it so i dont know why it wont work now</p>