Hello everyone,
for marketing reasons I usually export the user's email address executing this query manually (via mysql shell command):
use drupal7;select mail from drupal7_users INTO OUTFILE 'registered-users.sql'
but now I need to export only users who checked the checkbox during the registration process.
The checkbox is related to the profile field field_field_all_privacy_mktg
how can I edit my query for selecting only users with 1 value in field_field_all_privacy_mktg field?
in MySQL I have two tables:
drupal7_field_data_field_field_all_privacy_mktg
and
drupal7_field_revision_field_field_all_privacy_mktg
many thanks for helping me!
PB
Comments
Why not create a Drupal cron
Why not create a Drupal cron job or module to do this. In that way you can accomplish what you want using PHP, save your results into a custom table and don't need to be manually running your query.