how to loop to view all images from the sqlite database
<p>i am new to android and i have created a database using sqlite with images.When i view all my data i have inserted into the database only the hotness(string row) shows all the records but the images only show the first row.Can anyone help me please,l am desperate now.  </p>

<pre><code>public String getHot() {
             // TODO Auto-generated method stub

    String[] columns = new String[] { KEY_HOTNESS };
            Cursor c = ourDatabase.query(DATABASE_TABLE, columns, null, null, null,null,null);

    String hotness = "";
    int iRow = c.getColumnIndex(KEY_HOTNESS);
    for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
        hotness = hotness + c.getString(iRow) + "\n";
    }
    return hotness;
}

public byte[] getImage1(int id) {
    // TODO Auto-generated method stub

    String[] columns = new String[] { KEY_ROWID, KEY_NAME, KEY_HOTNESS,
    KEY_IMAGE1, KEY_IMAGE2, KEY_IMAGE3, KEY_IMAGE4,KEY_IMAGE5 };

    Cursor c = ourDatabase.query(DATABASE_TABLE, columns, null, null, null,
            null, null);
    if (c == null) {
        return null;
    }
    byte[] iMage1 = null;
    for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
        iMage1 = c.getBlob(c.getColumnIndexOrThrow(KEY_IMAGE1));
    }
    return iMage1;
}
</code></pre>
