Jump to content

members in x days


brown2005

Recommended Posts

1 2008-03-12 17:22:43

2 2008-03-12 17:22:43

3 2008-02-11 17:22:43

 

i have the above 3 results in my table.. and it comes up with 1.. which is number 3... which is out of 30 days. the code above looks like it gives all members that have logged in before $x amount of days.. but i want from $x days to now....

 

any ideas would be much appreciated..

 

thanks in advance.

 

Link to comment
Share on other sites

This part:

members_login <= (NOW() - INTERVAL $x DAY)

 

means If the date members_login is less than or equal to x days ago.

 

 

I think I got the symbol messed up and turned the wrong way :P So change it to this:

SELECT COUNT(*) AS members_count FROM members WHERE members_login >= (NOW() - INTERVAL $x DAY)

 

Link to comment
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.