1

I had asked a similar question a while back: How to delete all member accounts with no channel entries

Need a slightly different twist.

I need to remove member accounts that have authored no channel entries AND were created 6 months ago or older.

I could use some help writing the date part of the query.

Thanks!

1

This should get you started:

SELECT
    member_id,
    username,
    join_date,
    now(),
    (UNIX_TIMESTAMP(now()) - (86400 * 30 * 6))
FROM
    exp_members
WHERE
    join_date < (UNIX_TIMESTAMP(now()) - (86400 * 30 * 6))

Returns members who have a join date older than 15552000 seconds (about 6 months).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.