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)

 

 

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.

Archived

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

×
×
  • 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.