How to pass multiple values to query dynamically in android?
<p>In my project I have to select multiple values and pass it to a query. i.e page1 contains checkboxes. I am storing the selected checkbox id's into an array.
I am shuffling that array and getting the values randomly. Now I need to pass these random values to a query. Using IN operator in database I can pass the values 
statically but how can I pass the values dynamcially to the query. </p>

<p>For ex:(Passing values statically)</p>

<pre><code>SELECT * FROM Persons WHERE person_id IN ('21','22')
</code></pre>

<p>In the above query the id's 21 and 22 are know previously and so we are passing statically but I want to send the values to query dynamically.</p>

<pre><code>Page1:
public static ArrayList&lt;String&gt; chksublist = new ArrayList&lt;String&gt;();

Page2:
 Collections.shuffle(chksublist );
SELECT * FROM Persons WHERE person_id IN ('21','22')
In the above line I want to send the random values which are in chksublist array.
</code></pre>
