INSERT INTO ExtraStats (
DATE
, supportStaff
, startEmails
, endEmails
, emailsAnswered
)
VALUES (
'$startDate'
, '$supportStaff'
, '$startEmail'
, '$endEmail'
, '$emailAnswered'
)
ON DUPLICATE KEY
UPDATE
supportStaff = '$supportStaff'
, startEmails = '$startEmail'
, endEmails = '$endEmail'
, emailsAnswered = '$emailAnswered'
आप VALUES()
फ़ंक्शन ताकि आप मानों को दो बार पास न करें:
...
ON DUPLICATE KEY
UPDATE
supportStaff = VALUES(supportStaff)
, startEmails = VALUES(startEmails)
, endEmails = VALUES(endEmails)
, emailsAnswered = VALUES(emailsAnswered)