I am connecting to an online mysql db using B4A job. My table has questions and i would like to move from one question to the next using previous/next buttons.
What i have done so far is to add the id of the questions to a list. I then use an index and set it to
B4X:
CurrentIndex = questionslist.Size
my questionslist.size returns the correct number of questions from the table
How can i use it to get the exact question and post it on current page, then when i click next, it moves to the next question?
Sub selectquestions
ExecuteSelectQuery("select question,id from questions",Q_SELECT)
End Sub
Sub ExecuteSelectQuery(Query As String, JobName As String)
Dim job2 As HttpJob
job2.Initialize("job2", Me)
job2.PostString(url, Query)
End Sub
Thanks. The problem i am having is how to move to next and previous pages showing next and previous questions. For example if my list has the following
and i have a layout with a label and two buttons (previous and next buttons). How can i show the question on the label and move to next question on clicking next button?