Re: Re[2]: [PHP] Super bizarre changing variable!!
| From: | Brian Dunning | Date: | Fri, 05 Oct 2007 13:10:32 +0000 |
| Subject: | Re: Re[2]: [PHP] Super bizarre changing variable!! | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-262805@lists.php.net to get a copy of this message | ||
I definitely misunderstood what you guys are saying about the length. That's clearly a problem for a lot of my values.
I can switch them both to bigint. One table has 34,000,000 records and it's OK if this is hung up for a few minutes but not much longer than that - any chance this change might take longer than 5 or 10 minutes?
On Oct 5, 2007, at 5:43 AM, Richard Davey wrote:
Hi Brian, Friday, October 5, 2007, 1:28:35 PM, you wrote:This is indeed the complete code, I did not cut anything out for brevity, which is why this appears to be so impossible.eAccelerator is activated, could something be corrupt? Could a corrupt index cause this?In table1,The number in () after the int doesn't apply to the number of digits it can contain. A mediumint field will never hold a value above 16,777,215 assuming you are using an unsigned field, otherwise the limit is a mere 8,388,607 - neither of which are big enough to hold the value you're trying to put into it (69,833,818) An unsigned int field MAY be enough, the limit being 4,294,967,295 - but if you've got a 10 digit value LARGER than this, it'll still fail. Meaning you either need to use a bigint field, or rethink how you are storing these values in the first place. Cheers, Rich --Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of a window" --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phprefereris int(12). In table2,datais text In table2,friend_idis mediumint(9) - which I see is a problem in some cases, $referer can (rarely) be 10 digits long, so I just changed it to int(12)