When I try to delete a product in Magento I get the next error and I don't know where is the problem.
SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range
When I try to delete a product in Magento I get the next error and I don't know where is the problem.
SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range
Please try this:
DELETE FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 30 DAY);
It works for me.
I managed to make it work editing the file app/code/core/Mage/Sales/Model/Resource/Quote.php at row 221:
'items_count' => new Zend_Db_Expr("CASE WHEN q.items_count>0 THEN " . $adapter->quoteIdentifier('q.items_count') . ' - 1 ELSE 0 END')
basically I added the case when statement to prevent it subtracting 1 when the value already is 0
q.items_count
are quoted into the sql: 'items_count' => new Zend_Db_Expr(sprintf('CASE WHEN %1$s > 0 THEN %1$s - 1 ELSE 0 END', $adapter->quoteIdentifier('q.items_count')))
–
Deception Please try this:
DELETE FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 30 DAY);
It works for me.
to solve this issue follow below step
and delete product now
© 2022 - 2024 — McMap. All rights reserved.