Jump to content

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]
Link to comment
https://forums.phpfreaks.com/topic/5758-solved-sql-issue-query-not-working/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.