How to delete sql entries on click
<p>Lets say i had a a button that cycles through numbers how can i store the number but if the next array is displayed then delete the previous entry so on so on and so on. When i keep on pressing the button it diplays 1, 2 , 3 but i want it to show a single value.</p>

<p>Code example:</p>

<pre><code>        final CharSequence[] items = {"1", "2", "3"};            
        if (value &lt; items.length) {
           String s = (String)items[value];
           sqlName.setText(s);

            String sRow1 = sqlName.getText().toString();
            long lRow1 = Long.parseLong(sRow1);
            HotOrNot ex1 = new HotOrNot(this);
            ex1.open();
            ex1.deleteEntry(lRow1);
            ex1.close();
        }


            String name = sqlName.getText().toString();
            HotOrNot entry = new HotOrNot(SQLiteExample.this);
            entry.open();
            entry.createEntry(name);
            entry.close();

            }
</code></pre>
