However, here's what the documentation for SQLiteQueryBuilder. I'm a little confused on the syntax when it comes to the selection. The SQL that gets logged at this point is: SELECT _id, timestamp, type, value FROM barcodes WHERE (? = '?' AND ? = '?') I'm trying to use Android SDK's SQLiteQueryBuilder to join two tables, let's call them t1 and t2, and query that table based on an attribute from each table, say t1.att1 and t2.att2, equaling a certain value. String sql = builder.buildQuery(new String , I did this: SQLiteQueryBuilder builder = new SQLiteQueryBuilder() ītTables(_NAME) I started getting curious about the SQL that this generated so I did some more poking around and found SQLiteQueryBuilder (and apparently Stack Overflow doesn't handle links with parentheses in them well, so I can't link to the anchor for the buildQuery method), which I assume uses the same logic to generate the SQL statement. The following examples show how to use .You can vote up the ones you like or vote down the ones you dont like, and go to the original project or source file by following the links above each example. I never got any rows returned (no errors, either). I was trying to be good and use the query method of SQLiteDatabase and pass in the values in the selectArgs parameter to ensure everything got properly escaped, but it wouldn't work. Alright, I'm trying to query a sqlite database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |