title: android sqlite - instantiate-create-insert-search for elements
body: <p>I am new to android. I would like to create a database that will contain a name and phone number. I need to add in this database or to modify the phone number element. 
  Can someone please help me with creating a table with this two elements in database and check if a specific name exists. If no I want to create add add it in the table. If the name exists I want to be able to modify the phoe number. I want to create the table just once. I think I also need to check if the table is created or no. </p>
  
  <p>Can someone give me a full android example with instantiate, create, insert, delete or modify or search elements in a database? Please?</p>
  
  <p>Appreciate,. Thank you</p>
  
  <p>Based on the example with the student database (<code>http://androidpartaker.wordpress.com/2011/07/03/introduction-to-android-sqlite-database</code>)</p>
  
  <p>I have: </p>
  
  <pre><code>if (cursor != null) {
              while (cursor.moveToNext()) {
                  if (cursor.getString(1).equals("me")) value=i;
                  Log.i("Student", "Student Name: " + cursor.getString(1)
                          + " Grade " + cursor.getString(2));
  
                  i=i+1;
              }
          }
  
          Cursor cursor1 = dbUtil1.fetchStudent(value);
          if (cursor1 != null) {
              //while (cursor1.moveToNext())
              {
  
                  Toast.makeText(this, "Student "+ "Student Name: " + cursor1.getString(1)
                          + " Grade " + cursor1.getString(2),Toast.LENGTH_LONG).show();
  
                  //i=i+1;
              }
          }
  </code></pre>
  
  <p>but is not working properly. where am I wrong?</p>