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
- November 11, 2014 @ 09:58:09 [Current Revision] by admin
- November 11, 2014 @ 09:58:09 by admin
- November 11, 2014 @ 09:57:48 by admin
- November 11, 2014 @ 09:57:15 by admin
- November 11, 2014 @ 09:56:26 by admin
- November 11, 2014 @ 09:55:48 by admin
Revision Differences
November 11, 2014 @ 09:57:48 | Current Revision | ||
---|---|---|---|
Content | |||
Added: <div class="entry"> | |||
Added: <p> | |||
Added: 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, | |||
Added: </p> | |||
Added: <div> | |||
Added: <div class="syntaxhighlighter php" id="highlighter_424290"> | |||
Added: <div class="toolbar"> | |||
Added: | |||
Added: </div> | |||
Added: <table border="0" cellpadding="0" cellspacing="0"> | |||
Added: <tbody> | |||
Added: <tr> | |||
Added: <td class="gutter"> | |||
Added: <div class="line number1 index0 alt2"> | |||
Added: 1 | |||
Added: </div> | |||
Added: </td> | |||
Added: <td class="code"> | |||
Added: <div class="container"> | |||
Added: <div class="line number1 index0 alt2"> | |||
Deleted: <div class="entry"><p>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, <span id="more-1218" ></span></p><div><div id="highlighter_424290" class="syntaxhighlighter php"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></ span></div><table border="0" cellpadding="0" cellspacing=" 0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="php plain">SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in </code><code class="php string">'(`magento_ store`.`q`.`items_count` - 1)'</code></div> </div></td></ tr></tbody>< /table></div> </div><p>Here are three different options,which you can try one by one :</p><h3>Option 1</h3><div><div id="highlighter_31033" class="syntaxhighlighter php"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></ span></div><table border="0" cellpadding="0" cellspacing=" 0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="php functions">DELETE</code> <code class="php plain">FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 30 DAY);</code>< /div></div></ td></tr></tbody> </table></div> </div><h3>Option 2</h3><div><div id="highlighter_967194" class="syntaxhighlighter php"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></ span></div><table border="0" cellpadding="0" cellspacing=" 0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="php functions">DELETE</code> <code class="php plain">FROM sales_flat_quote WHERE customer_is_guest = 0;</code></div> </div></td></ tr></tbody>< /table></div> </div><h3>Option 3</h3><div><div id="highlighter_537361" class="syntaxhighlighter php"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></ span></div><table border="0" cellpadding="0" cellspacing=" 0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div><div class="line number6 index5 alt1">6</div><div class="line number7 index6 alt2">7</div><div class="line number8 index7 alt1">8</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="php plain">SET FOREIGN_KEY_CHECKS= 0;</code></div><div class="line number2 index1 alt1"><code class="php plain">#truncate customer_sales_ flat_quote;</ code></div><div class="line number3 index2 alt2"><code class="php plain">#truncate customer_sales_ flat_quote_address; </code></div><div class="line number4 index3 alt1"><code class="php plain">truncate flat_quote;</ code></div><div class="line number5 index4 alt2"><code class="php plain">truncate flat_quote_item; </code></div><div class="line number6 index5 alt1"><code class="php plain">truncate flat_quote_address; </code></div><div class="line number7 index6 alt2"><code class="php plain">truncate flat_quote_shipping_ rate;</code></div><div class="line number8 index7 alt1"><code class="php plain">SET FOREIGN_KEY_CHECKS= 1;</code></div></div></td> </tr></tbody> </table></div> </div></div> | Added: <code class="php plain">SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in </code><code class="php string">' (`magento_store`.`q`.`items_count` - 1)'</code> | ||
Added: </div> | |||
Added: </div> | |||
Added: </td> | |||
Added: </tr> | |||
Added: </tbody> | |||
Added: </table> | |||
Added: </div> | |||
Added: </div> | |||
Added: <p> | |||
Added: Here are three different options,which you can try one by one : | |||
Added: </p> | |||
Added: <h3> | |||
Added: Option 1 | |||
Added: </h3> | |||
Added: <div> | |||
Added: <div class="syntaxhighlighter php" id="highlighter_31033"> | |||
Added: <div class="toolbar"> | |||
Added: | |||
Added: </div> | |||
Added: <table border="0" cellpadding="0" cellspacing="0"> | |||
Added: <tbody> | |||
Added: <tr> | |||
Added: <td class="gutter"> | |||
Added: <div class="line number1 index0 alt2"> | |||
Added: 1 | |||
Added: </div> | |||
Added: </td> | |||
Added: <td class="code"> | |||
Added: <div class="container"> | |||
Added: <div class="line number1 index0 alt2"> | |||
Added: <code class="php functions">DELETE</code> <code class="php plain">FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 30 DAY);</code> | |||
Added: </div> | |||
Added: </div> | |||
Added: </td> | |||
Added: </tr> | |||
Added: </tbody> | |||
Added: </table> | |||
Added: </div> | |||
Added: </div> | |||
Added: <h3> | |||
Added: Option 2 | |||
Added: </h3> | |||
Added: <div> | |||
Added: <div class="syntaxhighlighter php" id="highlighter_967194"> | |||
Added: <div class="toolbar"> | |||
Added: | |||
Added: </div> | |||
Added: <table border="0" cellpadding="0" cellspacing="0"> | |||
Added: <tbody> | |||
Added: <tr> | |||
Added: <td class="gutter"> | |||
Added: <div class="line number1 index0 alt2"> | |||
Added: 1 | |||
Added: </div> | |||
Added: </td> | |||
Added: <td class="code"> | |||
Added: <div class="container"> | |||
Added: <div class="line number1 index0 alt2"> | |||
Added: <code class="php functions">DELETE</code> <code class="php plain">FROM sales_flat_quote WHERE customer_is_guest = 0;</code> | |||
Added: </div> | |||
Added: </div> | |||
Added: </td> | |||
Added: </tr> | |||
Added: </tbody> | |||
Added: </table> | |||
Added: </div> | |||
Added: </div> | |||
Added: <h3> | |||
Added: Option 3 | |||
Added: </h3> | |||
Added: <div> | |||
Added: <div class="syntaxhighlighter php" id="highlighter_537361"> | |||
Added: <div class="toolbar"> | |||
Added: | |||
Added: </div> | |||
Added: <table border="0" cellpadding="0" cellspacing="0"> | |||
Added: <tbody> | |||
Added: <tr> | |||
Added: <td class="gutter"> | |||
Added: <div class="line number1 index0 alt2"> | |||
Added: 1 | |||
Added: </div> | |||
Added: <div class="line number2 index1 alt1"> | |||
Added: 2 | |||
Added: </div> | |||
Added: <div class="line number3 index2 alt2"> | |||
Added: 3 | |||
Added: </div> | |||
Added: <div class="line number4 index3 alt1"> | |||
Added: 4 | |||
Added: </div> | |||
Added: <div class="line number5 index4 alt2"> | |||
Added: 5 | |||
Added: </div> | |||
Added: <div class="line number6 index5 alt1"> | |||
Added: 6 | |||
Added: </div> | |||
Added: <div class="line number7 index6 alt2"> | |||
Added: 7 | |||
Added: </div> | |||
Added: <div class="line number8 index7 alt1"> | |||
Added: 8 | |||
Added: </div> | |||
Added: </td> | |||
Added: <td class="code"> | |||
Added: <div class="container"> | |||
Added: <div class="line number1 index0 alt2"> | |||
Added: <code class="php plain">SET FOREIGN_KEY_CHECKS=0;</code> | |||
Added: </div> | |||
Added: <div class="line number2 index1 alt1"> | |||
Added: <code class="php plain">#truncate customer_sales_ flat_quote;</code> | |||
Added: </div> | |||
Added: <div class="line number3 index2 alt2"> | |||
Added: <code class="php plain">#truncate customer_sales_ flat_quote_address;</code> | |||
Added: </div> | |||
Added: <div class="line number4 index3 alt1"> | |||
Added: <code class="php plain">truncate flat_quote;</code> | |||
Added: </div> | |||
Added: <div class="line number5 index4 alt2"> | |||
Added: <code class="php plain">truncate flat_quote_item;</code> | |||
Added: </div> | |||
Added: <div class="line number6 index5 alt1"> | |||
Added: <code class="php plain">truncate flat_quote_address;</code> | |||
Added: </div> | |||
Added: <div class="line number7 index6 alt2"> | |||
Added: <code class="php plain">truncate flat_quote_shipping_ rate;</code> | |||
Added: </div> | |||
Added: <div class="line number8 index7 alt1"> | |||
Added: <code class="php plain">SET FOREIGN_KEY_CHECKS=1;</code> | |||
Added: </div> | |||
Added: </div> | |||
Added: </td> | |||
Added: </tr> | |||
Added: </tbody> | |||
Added: </table> | |||
Added: </div> | |||
Added: </div> | |||
Added: </div> |
Note: Spaces may be added to comparison text to allow better line wrapping.
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?
Hi,
I think you can use the following ways to protect your website from hackers:
– Use CDN of Cloudflare to increase the security and speed of your website. Their service is free for personal website https://www.cloudflare.com
– Upgrade WordPress frequently.
– Use the scan tools to detect and fix the security vulnerabilities, such as this one https://hackertarget.com/wordpress-security-scan
Regards,
Han.
I just got done eating a platter of spaghetti before visiting your site. It sure makes the full feeling all that much better.