[thelist] PHP/SQL storing year strangely

Kevin D. White nonzero at well.com
Fri Feb 22 14:13:00 CST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Most databases have special Date datatypes, you really should use
those instead.
- ----- Original Message -----
From: <NanHarbisonSmith at aol.com>
> I am working on an area of a school district website where school
> committee minutes from meetings will be uploaded by an
> admin/secretary in pdf format. On the form where this happens, I
> have the date and the meeting type as drop down boxes (so that
> fewer typos will occur here, maybe this is a good tip, to use drop
> down boxes when the choices are finite). I had the year field as a
> tinyint, since it is 4 digits long. The year showed up correctly
> everywhere except the way it was stored in the database. The year
> 2002 turned up in the database as 127 every time. I changed the
> data type to varchar, and that works fine. But can someone tell me
> what was going on there with the integer?

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPHalvlZZFo27GBIvEQKQEwCfW04YLveHztUgPmlnnl1rm7I516QAoLoT
lnLg9i/FZJ4GtIy9yQsBfoqN
=oZoS
-----END PGP SIGNATURE-----





More information about the thelist mailing list