Re[2]: [PHP] Super bizarre changing variable!!

From: Date: Fri, 05 Oct 2007 12:43:36 +0000
Subject: Re[2]: [PHP] Super bizarre changing variable!!
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-262803@lists.php.net to get a copy of this message
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, referer is int(12). > In table2, data is text > In table2, friend_id is 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) 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"

« previous php.general (#262803) next »