An attempt to update a row in table is resulting in a new insert:
Here is the code
var id = 2;
this.query()
.update('User')
.set({
'othername': data.othername,
'surname': data.surname,
'status' : data.status
})
.where('id = ?', [ id ])
.execute(function(error, result) {
if (error) {
console.log('ERROR: ' + error);
return;
}
console.log('RESULT: ', result);
});
An attempt to update a row in table is resulting in a new insert: Here is the code var id = 2; this.query() .update('User') .set({ 'othername': data.othername, 'surname': data.surname, 'status' : data.status }) .where('id = ?', [ id ]) .execute(function(error, result) { if (error) { console.log('ERROR: ' + error); return; } console.log('RESULT: ', result); });