I am implementing Sqlite db on my project using Phonegap. I know the problem is something to do with my insert statement because when I point the database success to my query and ultimately my querysuccess function I am getting alerts that the query was successful and the number of rows added is 0. I have tried and tried this is various different ways but to no avail. (If there are obvious errors it is because I am self-learning.) 

```
   function insertRecord(dbtx, userName, imagePath){
db = window.openDatabase("database", "1.0", "Profiles", 5000);
userName=document.getElementById('userName').value;
imagePath;
var insertRec="INSERT INTO USERS (username, imagePath) values ("+userName+", "+imagePath+")";
    db.transaction(function(dbtx){dbtx.executeSql(insertRec, [], queryDB, insFail);
    });
    }
function insFail(){
    alert('The insert is still failing');
}
   ....
   function successCB() {
    db = window.openDatabase("Database", "1.0", "Profiles", 5000);
    db.transaction(insertRecord, errorCB);// IF I PUT THE QUERYDB HERE INSTEAD OF INSERTRECORD IT WORKS BUT OBVIOUSLY THE RETURN IS ALWAYS 0
    console.log('The db and table are working');

```

This is my button to insert

```
   <input id="saveProfile" type="button" value="Save" onClick="insertRecord(dbtx, userName, imagePath);">

```