|
Posted by howzit on 06/14/07 21:43
On Jun 14, 2:23 pm, Michael Fesser <neti...@gmx.de> wrote:
> .oO(howzit)
>
> >I don't want to edit my SELECT statement - as his answer would
> >suggest.
>
> Why not? That would be the easiest and most reliable way.
>
> >I need the SELECT statement to stay as it is.
>
> Whenever possible you should let the database do all the dirty work.
> It's very good at handling things like date calculations and does it
> much more efficient than PHP.
>
> >I was hoping
> >for a function that would manipulate the one instance that I am
> >needing.
>
> In PHP you would have to turn the date into a Unix timestamp (strtotime)
> and calculate the difference to the current date. Two things might
> become an issue in some situations:
>
> * daylight saving time
> * Unix timestamp restrictions (1970-2038 on many systems)
>
> There's also a calendar extension in PHP for doing Gregorian and Julian
> date calculations, but this is not always available.
>
> So, as said, let the DB do it if possible.
>
> Micha
Sound advice - I do appreciate your input. I will give it a shot -
and post back my progress. Thanks!
Navigation:
[Reply to this message]
|