I assume that you can include "?" in your sqlite statement, provided in the "executeQuery" method, you pass additional arguments corresponding to each "?". But when I put this to practice, the results are not consistent.
This statement works:
SELECT * FROM answers WHERE test_id = ? and question_id = ?
with this method
FMResultSet * answer = [[UIApp database] executeQuery:[Queries getTheAnswer], l, n];
The following statement crashes the program when I include a "?"
SELECT * FROM questions where test_id = ? ORDER BY RANDOM() LIMIT ?
FMResultSet * set = [[UIApp database] executeQuery:[Queries randomNumberOfVerses], selectedTests, numRounds];
But works fine when I hardcode a value in.
SELECT * FROM questions where test_id = 5 ORDER BY RANDOM() LIMIT ?
FMResultSet * set = [[UIApp database] executeQuery:[Queries randomNumberOfVerses], numRounds];
Any suggestions since I don't want to hardcode values in? All variable used as arguments are of type NSNumber*