I am trying to insert value into sqlite database but I am not able to get success. I am trying to add this value into cordova phonegap application. As this is meant to run as phone app in device so I have put alert in the function to check the flow of the function but unfortunately I am getting only one alert that too of entering into function. Later alerts I am not able to receive.
Here is the code.
function InsertMobileData(){ myDB.transaction(function(transaction) { // Define insert query alert("In") var executeQuery = "INSERT INTO " + "Mobile_Table" + "(device_PhoneNumber) "+ "VALUES(?)"; Helper.log(executeQuery); alert(callingNo); alert(executeQuery); transaction.executeSql(executeQuery, ['"+callingNo+"'] , function(tx, result) { // On success alert("Mobile Number Inserted Successfully"); }, function(error){ // On error alert("Error while inserting data"); }); }); } Please help me to correct the code. Thanks.
alert(callingNo);andalert(executeQuery);?alert("In").After that i am not getting any alert messages..