Reputation: 1615
I have the query as following, the DbEntry.COLUMN_NAME_SCENE_ID
is a integer type. will a string "123" match with the integer 123 in the sqlitedatabase?
db.query(DbEntry.TABLE_NAME, new String[]{DbEntry.COLUMN_NAME_MODEL_PATH}, DbEntry.COLUMN_NAME_SCENE_ID+"=?", new String[]{String.valueof(scene_id)}, null, null, null);
Upvotes: 0
Views: 108
Reputation: 124844
It will work. SQLite is very lax with respect to types. For example you can fire up an SQLite client and connect to an SQLite database and run a query on a table with an integer field using a WHERE
clause with a string value. It will work just fine.
Upvotes: 1