Changeset 1074


Ignore:
Timestamp:
Mar 10, 2006, 12:03:57 AM (18 years ago)
Author:
rub
Message:

[NBM] Correction of sub-select query (remark about r1070)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/mailtousers.php

    r1072 r1074  
    9797  $query = '
    9898select
    99   id user_id, username, mail_address
     99  u.id user_id, u.username, u.mail_address
    100100from
    101   '.USERS_TABLE.'
    102 where
    103   mail_address is not null and
    104   id not in (select user_id from '.USER_MAIL_NOTIFICATION_TABLE.')
     101  '.USERS_TABLE.' as u left join '.USER_MAIL_NOTIFICATION_TABLE.' as m on u.id = m.user_id
     102where
     103  u.mail_address is not null and
     104  m.user_id is null
    105105order by
    106106  id;';
Note: See TracChangeset for help on using the changeset viewer.