Comment 40085

By crhayes (registered) - website | Posted April 23, 2010 at 00:43:36

There's an easy way to fix this... WordPress ;)

All joking aside, I have seen others with similar issues (on stackoverflow for example) where subtracting datetimes can cause buggy result records.

What if you tried using TIMESTAMPDIFF?

select *, now() as now, TIMESTAMPDIFF(SECOND, date_posted, now()) as timediff from comments where comment_id = :comment_id

You can use it with a SECOND argument.

P.S. Why don't you use WordPress? I'm guessing it's because developing this is more enjoyable (as a hobby?)... that's how it is for me...

P.P.S. This site is blazingly fast, I'm sure that's a factor ;)

Comment edited by crhayes on 2010-04-22 23:59:37

Permalink | Context

Events Calendar

There are no upcoming events right now.
Why not post one?

Recent Articles

Article Archives

Blog Archives

Site Tools

Feeds