This is the line
PreparedStatement delete = con.prepareStatement("DELETE FROM " + tableName +" WHERE first LIKE " + firstName + " AND last LIKE " + lastName);
I want to check if both the first name and the last name match the query before i delete the row. 'first' and 'last' are both columns in my table. I am getting this error message
org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such column: Hendrix)
In this case Hendrix is the value for lastName
.
Why does last LIKE ____ not work in this case? Is there another keyword i should use if i am checking multiple strings?