title: Using where clause with javascript variable
body: <p>Hello all this is my first question on stack overflow.
  I am developing an app with phonegap, with using webSQL and javascript.
  In my App there is a login form which takes two inputs as: username and password.
  when user fills these values and clicks on Login these values are checked in database table which have multiple rows. 
  for checking values I am using this query-</p>
  
  <pre><code>var email=document.getElementById("uname").value;
  tx.executeSql('SELECT * FROM USERINF Where Email=email', [], MatchPass, errorCB1);
  </code></pre>
  
  <p>But the query is not working with where clause with a java script variable.
  I have also tried many syntexes such as </p>
  
  <pre><code>where Email=@email
  where Email="+email+"
  </code></pre>
  
  <p>and many more but they all not worked.</p>
  
  <p><strong>Is it possible to use a javascript variable with where clause??
  If yes please tell me how.
  if not please suggest me any other way to accomplish the task.
  thanks in advance.</strong></p>
  
  <p>this is my full <strong>JavascriptCode</strong></p>
  
  <pre><code>// JavaScript Document
  var db=window.openDatabase("CakeViewer", "1.0", "Cake Viewer", 2*1024*1024);
  
  function login()
  {
  
  db.transaction(matchcred)
  
  function matchcred(tx)
  {
      var eml=document.getElementById("uname").value;
       tx.executeSql('SELECT * FROM USERINF Where Email=eml', [], MatchPass, errorCB1); 
   //problem is in above line-- the query is not executed with variable where clause. But it works fine if I use where Email="abc@abc.com"
  
  }
  
  
  function MatchPass(tx, results)
  {
      var orgnalPass=results.rows.item(0).Password;   
      var userinputedPass=document.getElementById("pass");
  
      if(orgnalPass==userinputedPass.value)
      {
          window.location.href='HomePage.html';
      }
      else
      {
          errorCB();
      }
  }
  
  function errorCB(tx,err)
  {
      alert("User Name or Password is not valid !");
      document.getElementById("uname").value="";
      document.getElementById("pass").value="";
  }
  
  function errorCB1()
  {
      alert("Query failed");
  }
  
  function errorCB2(tx,err)
  {
      alert("errorCB2"+err);
  }
  }
  </code></pre>