---
title: "Magento deleting product BIGINT UNSIGNED value is out of range"
date: "2013-09-25"
path: "/162-magento-deleting-product-bigint-unsigned-value-is-out-of-range.html"
section: "/ramblings"
aliases:
  - "/162"
  - "/162-magento-deleting-product-bigint-unsigned-value-is-out-of-range"
  - "/162.html"
  - "/ramblings/162-magento-deleting-product-bigint-unsigned-value-is-out-of-range.html"
---

Several of our clients get an unusual recurring error in their Magento stores looking like:

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

## Option 1

```
DELETE FROM magento_sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 30 DAY);
```

## Option 2

```
DELETE FROM magento_sales_flat_quote WHERE customer_is_guest = 0;
```

## Option 3

```
SET FOREIGN_KEY_CHECKS=0;
#truncate magento_enterprise_customer_sales_flat_quote;
#truncate magento_enterprise_customer_sales_flat_quote_address;
truncate magento_sales_flat_quote;
truncate magento_sales_flat_quote_item;
truncate magento_sales_flat_quote_address;
truncate magento_sales_flat_quote_shipping_rate;
SET FOREIGN_KEY_CHECKS=1;
```
