Jump to content

Is this possible


topflight

Recommended Posts

I am trying to figure out how can I get certain members out of the database who hasn't filed hours in the last 30days from the last hour filed.

(i.e a member files hours on 1/20/2009 but hasn't filed hours sent them.) How can I get that member out of the database. FYI this is more of an inactivity check. But if they did file some more hours 30 days within 1/20/2009 them I want the system to wait another 30days and if no new hour was filed in 30days it will get the member is that possible?

Link to comment
https://forums.phpfreaks.com/topic/150345-is-this-possible/
Share on other sites

last_login varchar(20),

 

inserted in your database, so it shows there last login.

 

As for automaticaly deleting users after 30 days, it is 100% possible.

Its a SQL Query you need of course, which obviously is relating to 'delete users last log 30 days ago'

Link to comment
https://forums.phpfreaks.com/topic/150345-is-this-possible/#findComment-789762
Share on other sites

use the "users" table to get inactive accounts by used the field "last_login" and then to wipe out all rows linked to the master key "user_id"

 

Which will then remove the the user after a certain amount of days given which would be using brackets (30) You will need a volunteer to write a embedded database maintenance script.

 

There will be someone out there who can assist you. This is all I can do. Hope any of it is any use to you.

Link to comment
https://forums.phpfreaks.com/topic/150345-is-this-possible/#findComment-789766
Share on other sites

Insert Quote

last_login varchar(20),

 

Wrong.

 

inserted in your database, so it shows there last login.

 

Already discussed this.

 

As for automaticaly deleting users after 30 days, it is 100% possible.

 

This too...

 

There are multiple ways to get rid of these records but I find the easiest is with the DATE_SUB() function.  There are some examples you can use from the link.

 

You also need to use the crontab or windows task scheduler depending on what OS you're server is on.  I think the command is "crontab -e" or something.  Read more Here.

Link to comment
https://forums.phpfreaks.com/topic/150345-is-this-possible/#findComment-789768
Share on other sites

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.