How to access multiple column value in android sqlite application?
<p>I am building an application where i need to access some details about the user that i stored in an sqlite database. The issue is that i am familiar with the code to return "just" a single value...but when i try to access more than one column..the application errors out.
Below is the code i am using.Thanks.</p>

<pre><code>public String selectAll()
{

Cursor cursor = db.query(DB_TABLE_NAME2, new String[] {   DB_COLUMN_1_NAME,DB_COLUMN_2_NAME,DB_COLUMN_3_NAME,DB_COLUMN_4_NAME,DB_COLUMN_5_NAME,DB_COLUMN_6_NAME},null, null, null, null,null); 

  if(cursor.getCount() &gt;0)
  {


      cursor.moveToNext();

          email = cursor.getString(cursor.getColumnIndex(DB_COLUMN_1_NAME));
          password=cursor.getString(cursor.getColumnIndex(DB_COLUMN_2_NAME));
           phone = cursor.getString(cursor.getColumnIndex(DB_COLUMN_3_NAME));
           fname=cursor.getString(cursor.getColumnIndex(DB_COLUMN_4_NAME));
           lname = cursor.getString(cursor.getColumnIndex(DB_COLUMN_5_NAME));
           location=cursor.getString(cursor.getColumnIndex(DB_COLUMN_6_NAME));
           street = cursor.getString(cursor.getColumnIndex(DB_COLUMN_7_NAME));

  }

           return password;
           return email;
           return phone;
           return fname;
           return lname;        

           return location;
           return street;
           return email;  


}  
</code></pre>
