Jump to content


Photo

Data type Query


  • Please log in to reply
3 replies to this topic

#1 bach

bach
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 20 May 2006 - 08:30 PM

Hello,

Wonder if you can help. I am looking at the data type of the dateRegistered field for a form script I have got they are using int(10) why ?? why not date ??

Confusing me.

Cheers.

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 20 May 2006 - 10:20 PM

Shouldn't be... dates should always be stored as DATEs. I guess you could get away with storing a timestamp value in a numeric field, but that's a bad idea.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 bach

bach
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 21 May 2006 - 10:54 AM

I was under the sam impression, if there isn't a good reason then I will use a date field for mine.

The forum software was

[a href=\"http://www.simplemachines.org/\" target=\"_blank\"]Simple Machine Forum[/a]

Cheers.

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 21 May 2006 - 04:35 PM

You might want to use a DATETIME -- no reason to throw out half the information.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users