CREATE TABLE `sync_orders_attempts` (
`attempt_id` INT(11) NOT NULL AUTO_INCREMENT,
`incremental_id` INT(11) NULL DEFAULT NULL,
`order_id` INT(11) NULL DEFAULT NULL,
`attempt_time` DATETIME NULL DEFAULT NULL,
`raw_response` TEXT NULL,
`update_response` TEXT NULL,
`soap_data` VARCHAR(5000) NULL DEFAULT NULL,
`update_data` TEXT NULL,
INDEX `Index 1` (`attempt_id`, `incremental_id`, `order_id`)
)
COLLATE='latin1_swedish_ci'
ENGINE=MyISAM
ROW_FORMAT=DEFAULT
INSERT INTO SYNC_ORDERS_ATTEMPTS (`incremental_id`,
`order_id`,
`raw_response`,
`update_response`,
`soap_data`,
`update_data`,
`attempt_time`)
VALUES (0,
0,
'XXX',
'XXXXXX',
'XXXXXXX',
'XXXXXXXXXX',
now())
ON DUPLICATE KEY UPDATE `incremental_id` = VALUES(`incremental_id`),
`order_id` = VALUES(`order_id`),
`raw_response` = VALUES(`raw_response`),
`update_response` = VALUES(`update_response`),
`soap_data` = VALUES(`soap_data`),
`update_data` = VALUES(`update_data`),
`attempt_time` = VALUES(`attempt_time`)
If I remove the autoinc from the attempt_id column and the index, it still ignores the duplicate key.Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE