want to get a row from cursor
<p>I want to get a row and this row have 2 columns which named <code>username</code> and <code>password</code> my code is here:</p>

<pre><code>String selection = PROFILE_COLUMN_USERNAME + " = '" + userName+ "' AND " +PROFILE_COLUMN_PASSWORD + " = '" + password + "'";
Cursor cursor = database.query(TABLE_NAME, new String[] {PROFILE_COLUMN_USERNAME, PROFILE_COLUMN_PASSWORD }, selection,null, null, null, null);
</code></pre>

<p>I got a sample data like <code>username = erdem</code> and <code>password= c</code> on my db but when i write this sample and write to get <code>username</code>  like this:</p>

<pre><code>String s =cursor.getString(cursor.getColumnIndex(PROFILE_COLUMN_USERNAME));
</code></pre>

<p>it doesn't work. Why?</p>
