R: [PHP][MySQL] FAKE DUPLICATE ROW
| From: | Alessandro Vitale | Date: | Fri, 20 Feb 2004 14:15:46 +0000 |
| Subject: | R: [PHP][MySQL] FAKE DUPLICATE ROW | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178354@lists.php.net to get a copy of this message | ||
you are an angel,
thanks for your great suggestion.
cheers
alessandro
-----Messaggio originale-----
Da: Richard Davey [mailto:rich@launchcode.co.uk]
Inviato: venerdi 20 febbraio 2004 14.40
A: php-general@lists.php.net
Oggetto: Re: [PHP][MySQL] FAKE DUPLICATE ROW
Hello Alessandro,
Friday, February 20, 2004, 1:31:02 PM, you wrote:
AV>
code int(20) default NULL,
AV> so that seems that mysql has created a completely wrong key for this
row!
AV> my question is: is there a limit for the integer part of the index, or a
bug
AV> any suggestion would be very much appreciated.
The maximum value an INT field can hold is 4,294,967,295 on an
UNSIGNED field - you have not declared your code field as unsigned
which means you have halved this maximum value (because it must cope
with the minus values as well) - so consequently your 3,726,227,013
value is simply too big for it.
Change to a BIGINT or make the field unsigned.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php