Jump to content

Users who re-visit in less than 48 hours.


iconic

Recommended Posts

This must be less complex than what it sounds like.

 

I want to find out the users that have logged in my page in LESS THAN 48 hours in the first trimester of last year. And place them in another table.

 

My MySql DB has a table with "user id" and "date" fields.

 

I have sorted out users that have visited only once in that trimester, leaving only duplicates: with repeating "userid" but with different "date".

 

I have spent days now trying to figure out how to use de date_diff function to solve this. My date format is d/m/y.

 

 

Please help with code!

 

Thank you.

 

(excuse my english)

 

 

Link to comment
Share on other sites

Pikachu2000: Your solution is very helpful if MySqls allow_invalid_dates function would work. Remember my format is dd/mm/yy. It converted my dates to 0000-00-00.

 

Unless there is a function I am unaware of. i believe this option is discarded.

 

Kira: I´m burning my neurons using your solution here, and I think it will work. I am sure as a beginner in PHP I can figure it out.

 

Thanks for the help! I´ll post updates on my progress.

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.