You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
When I run the test application included here I am getting the insertId as null. How can I get the id of the last row that has been inserted when the INSERT query is called?
I need the last row inserted id for using in the other places as foreign key. In the below code from the test application I get insertId as undefined. Any help is greatly appreciated.
Hi,
When I run the test application included here I am getting the insertId as null. How can I get the id of the last row that has been inserted when the INSERT query is called?
I need the last row inserted id for using in the other places as foreign key. In the below code from the test application I get insertId as undefined. Any help is greatly appreciated.
tx.executeSql(
'INSERT INTO sql_test (test_id, test_name) VALUES (?, ?);',
['1', 'Hi 1'],
function(results){console.log('Callback 2 complete')
console.log('Callback 2 complete result:'+JSON.stringify(results))
recordId = results.insertId;
console.log('Callback 2 complete result: '+recordId)
The text was updated successfully, but these errors were encountered: