title: webSql select query error
body: <p>In developing in PhoneGap for Android, I'm trying to store data in database and want to retrieve it, and during the select query I am getting errors: the <code>.code</code> will be zero and the <code>.message</code> will be <code>"the statement callback raised an exception or statement error callback did not return false"</code>. Sometimes both <code>message</code> and <code>code</code> are undefined. </p>
  
  <p>In my code below I am mentioning where I am getting error. Otherwise all is working fine. I think my <code>usy</code> call back function I solved the synchronous problem so please I think some syntax error. Sometimes it calls my success method and there it shows length is not undefined.</p>
  
  <pre><code>$scope.data_for_net=function(check){
  //var db = window.openDatabase("JiyoNatural", "1.0", "JiyoNatural", 200000);
      var today=new Date();
  
       var dd=today.getDate();
  
       var mm=today.getMonth()+1;
  
       var yyyy=today.getFullYear();
  
       if(dd&lt;10) {
  
           dd='0'+dd;
  
       } 
  
      if(mm&lt;10) {
  
          mm='0'+mm;
  
          } 
  
       today = yyyy+'-'+mm+'-'+dd;    
  
        todayDate=today.toString();
  
  
      db.transaction(function(tx){
  
  
  
              var query='SELECT * FROM Recipe WHERE Recipe_Date=?,Recipe_meal_Type=?';
  
  
              //var sql_query='select * from Recipe where Recipe_Date="'+todayDate+'" and Recipe_meal_Type="+Lunch"'
  
              // tx.executeSql('select * from Recipe where Recipe_Date=?,Recipe_meal_Type=?;', [todayDate]["Lunch"], $scope.query_data_fatch_for_lunch, $scope.transaction_error);//here i am getting error
  
               tx.executeSql(query, [todayDate],['Lunch'], $scope.query_data_fatch_for_lunch, $scope.transaction_error);
  
           });
     }
  
      }   
  
  //this is my method
  
  $scope.query_data_fatch_for_lunch=function(tx,result){
  
  console.log("data_fatch_for_lunch is calling");
  
  var RecipeInfo=[];
  
  var recipe={};
  
  var rowData=[];
  
  for(var i=0;i&lt;result.rows.length;i++){
  
      var meal_type=result.rows.item(i).Recipe_meal_Type;
  
      var recipe_item=result.rows.item(i).Recipe_Name;
  
      console.log(recipe_item);
  
      var energy=result.rows.item(i).Recipe_energy;
  
      var carbohydrate=result.rows.item(i).Recipe_corbohydrates;
  
      var protein=result.rows.item(i).Recipe_protein;
  
      var fat=result.rows.item(i).Recipe_fat;
  
      rowdata.push(recipe_item);
  
      rowdata.push(energy);
  
      rowdata.push(carbohydrate);
  
      rowdata.push(protein);
  
      rowdata.push(fat);
  
      console.log("data is successfull add");
  
  }
  
  recipe.itemInfo=rowdata;
  
  recipe.itemType=meal_type;
  
  RecipeInfo.push(recipe);
  
  }   
  </code></pre>