I'm trying to use ?s as params building my query but there is clearly something wrong with it. Wish the documentation was providing at least one example...
SQLDb.rawQuery("SELECT C.?, B.?, B.?, B.? FROM ? C, ? B WHERE C.? = B.?", new String[]
{Tables.CATEGORIES_NAME, Tables.BUDGET_DATE, Tables.BUDGET_VALUE, Tables.KIND, Tables.CATEGORIES, Tables.BUDGET, Tables.CATEGORIES, Tables.TABLE_ID, Tables.TABLE_ID});
Those const are all strings, simply names of the columns. What am I doing wrong?
?doesn't append theStringdirectly in the queryStringas it's used to prevent malicious stuff(like aDROP TABLE *added directly to the queryStringinstead of one of the parameters). I'm no database expert so maybe someone with a little more knowledge would offer an answer. stackoverflow.com/questions/5491107/…