Date: 11/30/01
- Next message: Jeroen Olthof: "[PHP] Don't tell me this isn't possible (object related question)"
- Previous message: faeton: "Re[2]: [PHP] Strange problem..."
- In reply to: Daniel Alsén: "RE: [PHP] Strange problem..."
- Next in thread: Daniel Alsén: "RE: [PHP] Strange problem..."
- Reply: Daniel Alsén: "RE: [PHP] Strange problem..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>
>For additional commands, e-mail: php-general-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
-- Jim Musil --------- Multimedia Programmer Nettmedia ------------- 212-629-0004 jim <email protected>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jeroen Olthof: "[PHP] Don't tell me this isn't possible (object related question)"
- Previous message: faeton: "Re[2]: [PHP] Strange problem..."
- In reply to: Daniel Alsén: "RE: [PHP] Strange problem..."
- Next in thread: Daniel Alsén: "RE: [PHP] Strange problem..."
- Reply: Daniel Alsén: "RE: [PHP] Strange problem..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

