[Magento Fix] SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range

Last week, while working on a client’s Magento 1.7.x website, we were trying to delete all the catalogue products, but it did not happen and it kept on throwing this error,

 
1
SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '(`magento_store`.`q`.`items_count` - 1)'

Here are three different options,which you can try one by one :

Option 1

 
1
DELETE FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 30 DAY);

Option 2

 
1
DELETE FROM sales_flat_quote WHERE customer_is_guest = 0;

Option 3

 
1
2
3
4
5
6
7
8
SET FOREIGN_KEY_CHECKS=0;
#truncate customer_sales_flat_quote;
#truncate customer_sales_flat_quote_address;
truncate flat_quote;
truncate flat_quote_item;
truncate flat_quote_address;
truncate flat_quote_shipping_rate;
SET FOREIGN_KEY_CHECKS=1;

Revisions

3 Responses to “[Magento Fix] SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range”

  1. Cialis generic 26/03/2018 at 6:04 pm #

    Hi! I just wanted to ask if you ever have any trouble with hackers? My last blog (wordpress) was hacked and I ended up losing months of hard work due to no backup. Do you have any solutions to protect against hackers?

  2. Dimple Wardrip 30/05/2018 at 5:03 am #

    I just got done eating a platter of spaghetti before visiting your site. It sure makes the full feeling all that much better.

Leave a Reply