Jump to content

Archived

This topic is now archived and is closed to further replies.

Prismatic

**SOLVED** SQL Issue - Query not working..

Recommended Posts

On my forums i'm developing I have an Active Topic page. This page is supposed to list only the topics posted in within the last 30 minutes.

The query is as follows:

[code]SELECT * FROM topics WHERE DATE_SUB(NOW(),INTERVAL '30:00' MINUTE_SECOND) >= time ORDER BY time DESC[/code]

Now, the "time" column is just a dump of time(); when the topic was posted. Im not sure but I think because the SQL is using now() and not time() it is failing (Failing as in outputting a bunch of topics that have not really been posted on within the last 30 minutes)

Any ideas?

EDIT - Figured it out, consider topic [b]*SOLVED*[/b]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.