Deleting from SQLite
<p>Hy!</p>

<p>I always get e sql error. I log the id of the choosen item and then i want to remove it from the ListView and from the db</p>

<p>My code:</p>

<pre><code>public boolean onItemLongClick(final AdapterView&lt;?&gt; arg0, final View arg1,
    final int arg2, long arg3) {
        final Pizza pizza = (Pizza)arg0.getItemAtPosition(arg2);
        Log.e("xxx",String.valueOf(pizza.id));
        AlertDialog.Builder builder = new AlertDialog.Builder(Main.this);
        builder.setMessage("Are you sure you to delete " + pizza.title + "?")
       .setCancelable(false)
       .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int id) {
            aa.notifyDataSetChanged();
            list.remove(pizza);
            aa = new CustomAdapter(Main.this, R.layout.customlistitem,list);
            lv.setAdapter(aa);
                myDB = Main.this.openOrCreateDatabase(MY_DB_NAME, MODE_PRIVATE, null);
                myDB.execSQL("DELETE FROM "+MY_DB_TABLE+ " WHERE ID="+pizza.id);
       }
</code></pre>

<p>Log:</p>

<p>xxx is 1 so the id of the pizza is 1</p>

<pre><code>10-03 09:23:13.135: ERROR/AndroidRuntime(640): android.database.sqlite.SQLiteException: no such column: ID: DELETE FROM Pizza WHERE ID=1
</code></pre>
