WebSQL, Phonegap. Return the ID of the last inserted row WebSQL, Phonegap. Return the ID of the last inserted row sql sql

WebSQL, Phonegap. Return the ID of the last inserted row


I was close. This does the trick:

tx.executeSql(            'INSERT INTO locations (lTitle) VALUES (?)',            [$('#newLocation').val()],            function(tx, results){                alert('Returned ID: ' + results.insertId);            },            errorCB        );