RE: [PHP] Strange problem...
| From: | Jim Musil | Date: | Fri, 30 Nov 2001 23:06:07 +0000 |
| Subject: | RE: [PHP] Strange problem... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76273@lists.php.net to get a copy of this message | ||
This may be a rough explanantion, but when you store numbers, the length is not actually the number of digits, but the number of binary digits it would use when converted from decimal to binary.
So, a length of 1, could only have 0 or 1 as inputs.
a length of 2 could only have 0,1,2,or 3
The equation to determine your limit (i think) is (2^n)-1
The length of your int is limited to 23.
Your date 20001129 is bigger than this.
You should really be storing your dates as datetime so you can take advantage of the date sorting functions. But then you'd need to use date() to format the string into yyyy-mm-dd format.
Jim
Thanks guys... I guess it´s too late here now .) It fixed itself when i altered the field type to varchar. Although - i don´t really get why it can´t store the vlaue i am sendding it the field is of integer type. - Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net-- Jim Musil --------- Multimedia Programmer Nettmedia ------------- 212-629-0004 jim@nettmedia.com