Raw Query With Multiple Parameters
PREF_NAME, PREF_STATUS - text It gives me this error: 07-02 14:08:07.457: E/AndroidRuntime(17295): android.database.sqlite.SQLiteException: near '?': syntax error: , while compilin
Solution 1:
According with the documentation, you only can put "?" on where clause:
public Cursor rawQuery (String sql, String[] selectionArgs)
Parameters
sql the SQL query. The SQL string must not be ; terminated
selectionArgs You may include ?s inwhere clause in the query, which will be replaced by the valuesfrom selectionArgs. The values will be bound as Strings.
Solution 2:
After the SELECT
keyword you have a ?
instead of something like *
.
Post a Comment for "Raw Query With Multiple Parameters"