1
我只想問,如果這是使用選擇正確的方式,從等,如果我的條件是正確的:這是原始查詢的正確方法嗎? - Android電子
private Cursor delete(){
calendarData = new CalendarData(this);
SQLiteDatabase db = calendarData.getWritableDatabase();
String mySQL = " select"+ _ID+ "from " + TABLE_NAME + "where" + _ID + "==" + deleteAnAppointment.getText().toString();
Cursor idToDelete = db.rawQuery(mySQL, null);
startManagingCursor(idToDelete);
return idToDelete;
}
private void selectToDelete(Cursor cursor){
calendarData = new CalendarData(this);
SQLiteDatabase db = calendarData.getWritableDatabase();
if(cursor.getCount() > 0){
db.delete(TABLE_NAME, _ID+" = "+deleteAnAppointment.getText().toString(), null);
}
}
我沒有得到任何結果,但無論如何只是想看看它正確的格式化SQL的方法,謝謝
最新的問號? – a7omiton 2012-04-25 20:16:10
你是什麼意思? – waqaslam 2012-04-25 20:20:37
「=?」在sql – a7omiton 2012-04-25 20:27:05