Answer the question
In order to leave comments, you need to log in
How can I tell if an entry has been updated or added?
Plz tell me how to determine.
Has the entry been added or has it been updated?
In other words, how do you know if INSERT or UPDATE worked?
I make a request:
INSERT INTO ........'
ON DUPLICATE KEY UPDATE
........
https://knexjs.org
Object arrives
{ fieldCount: 0,
affectedRows: 1,
insertId: 56,
serverStatus: 2,
warningCount: 0,
message: '',
protocol41: true,
changedRows: 0 }
Answer the question
In order to leave comments, you need to log in
By Affected Rows ( www.mysqltutorial.org/mysql-insert-or-update-on-du...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question