node-db-mysql icon indicating copy to clipboard operation
node-db-mysql copied to clipboard

Update command having insert effects

Open amichaelgrant opened this issue 12 years ago • 0 comments

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); });

amichaelgrant avatar Mar 13 '13 18:03 amichaelgrant