Android query using extras in the where statement
<p>I having trouble with my database i was wondering how would i be able to connect two variables in a sql query.  Example i have a bus schedule that has two tables and im trying to use two put extras to query the results i want but im not sure if im able to use two extras in the where statement to replace the '?' with.  I get no errors when i do it but nothing displays but when i take away one of the extras it works but doesnt display the right information that i want.  Could someone explain why this wont work if i cant use two '?' at once or if im doing something wrong.</p>

<pre><code>enter code here   



     idDay = getIntent().getStringExtra("Day_ID");
        idNum = getIntent().getIntExtra("BUS_ID", 0);


        Cursor cursor = db.rawQuery
        (

         "SELECT A2._id, A2.dayOfWeek, A2.direction " +
         "FROM TimeTable A2 " + 
//         "WHERE A2._id = ? " +
//         "WHERE A2.dayOfWeek = ? " +
         "WHERE (A2._id = ?) AND (A2.dayOfWeek = ?) " +
         "GROUP BY A2.direction", 

//       new String[]{""+idNum});        


        new String[]{""+idNum+idDay});     
//         new String[]{""+idNum});        
</code></pre>
