int getIdForSong(Song song){
String selectQuery = "SELECT id FROM " + TABLE_SONG + " WHERE " + SONG_TITLE + "=" + song.getSongTitle() + " AND " + ARTIST_NAME + "=" + song.getArtistName();
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery(selectQuery, null);
int id = Integer.parseInt(cursor.getString(0));
return id;
}
我在“=”附近遇到异常。任何人?