I am making a quiz app in which i have to select the number of question depending upon user choice.Actually i want to something like this
db.execute('select * from Quiz limit **Variable**')//Here i want to use variable instead of constant value.
Could you help me in this
Thanks in advance
Change your code as:
where variable is set according to user selection
NOTE :
db.executeis not SQLiteDatabase class method in Android you will need to use execSQL or query methods for quering database tableand see this tutorial for performing all select,delete,update and insert operation on database in android :
http://www.androidhive.info/2011/11/android-sqlite-database-tutorial/