Wednesday, February 18, 2009

Drupal user table : Users list joined before a week

Drupal stores dates in Unix time format. To find email addresses for users who joined after a certain date Use SQL query in phpmyadmin and then exported into an OpenOffice spreadsheet:

SELECT mail, FROM_UNIXTIME(created) FROM users WHERE created > 1199145600 LIMIT 500;

That returns 500 emails from users who registered since January 1, 2008. The FROM_UNIXTIME(created) converts the Unix formatted time into something human-readable.

No comments:

Post a Comment