title: How to solve all in one query?
body: <p>In my search module I am using SQLite database. Sometimes I'm searching more than two values. So I am using <code>AND</code> condition and sometimes searching only one value. These two cases I need to implement in a single query. Please help me.</p>
  
  <p>This is the query:</p>
  
  <pre><code>Cursor dbcur = myDB.rawQuery("select * from "+dbtable+" where Status='"+item+"'AND ball_court='"+ball+"'AND Tovendor='"+vendor+"'", null);
  </code></pre>
  
  <p>Sometimes I am searching <code>status</code> and <code>ball_court</code>, <code>tovendor</code> and sometimes I am searching <code>status</code> only. How to solve this problem?</p>