FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to loop through the dates?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to loop through the dates? [message #186132 is a reply to message #186122] Sun, 15 June 2014 21:39 Go to previous messageGo to previous message
Doug Miller is currently offline  Doug Miller
Messages: 171
Registered: August 2011
Karma:
Senior Member
richard <noreply(at)example(dot)com> wrote in news:cyaf96m0jpev$.1a2m47bjjrqjk$.dlg@
40tude.net:

> In this instance "date" in the line you left quoted, refers to a column
> name.

Yes, we understand this. You don't appear to understand that *calling* a string column
"date" doesn't actually *make* it a date. A string column named "date", and a DATE
column are distinctly different data types.

> What if it had been "hits" instead or "title"?

Then you wouldn't have a problem -- because SQL sorts both numeric data and string data
in the order you expect it to be sorted, but when you store a date as a MMDDYYYY string,
the sorted order is *not* what you expect.

> You guys are hell bent on this date issue you forget that columns can hold
> any data in any manner.Regardless of their name.

We're not forgetting anything. You are failing to realize that strings are not appropriate
storage types for date data.

> The only two things the table cares about is, the data is either a string
> or a numeric.

Patently false. Those are not the only types of data that can be stored in a SQL database.
You, in particular, have no excuse for being unaware of that fact, since you have been told
many times that you should store dates using the DATE data type. This you have
truculently and ignorantly refused to do.

And now you have a perfect example of *why* you were advised to use the DATE date
type to store date information.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What is the purpose of "&" in this code?
Next Topic: why is it always an endless loop?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 13:51:24 GMT 2024

Total time taken to generate the page: 0.05593 seconds