Friday, April 22, 2016

Solve 'Numeric value out of range: 1690' Error in Magento

Magento is mostly used e-commerce platform based on PHP. So when you work on this platform as a developer or site owner than it's hard to fetch some complicated error occur in Magento admin panel or front.
In Magento admin panel when you try to delete any product, customer or order than some times it's display 'SQLSTATE [22003]: Numeric value out of range: 1690' and product or customer not deleted.This error because of table attributes not supported data value in MySql database. This error because of table attribute not supported data value in MySql database. This error because of some big value store in databases and that structure not support that value.
So here is a simple way for solving this error. In Magento all table connect to each other with foreign key relation so this error, mostly on the order table so you just change as below or order table.
  • Login to your database using PhpMyadmin in localhost or via cPanel.
  • Select Magento database (If you don't know than find in `local.xml` file in app/etc/).
  • First tack backup of complete database before change anything(using export functionality) so revert back in case of any problem.
  • Select `sales_flat_quote` table.(If your db have prefix than find table according to that)
  • Click on `Structure` tab from top.
  • Click on Change/Edit row `items_count`
  • In `Attributes` drop down change value from `UNSIGNED` to the very top value which is blank ‘(no value)’
  • Click on save for change table structure.
  • Now clear all Magento caches and try to delete it's worked.