aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-03-09 23:03:57 +0000
committerrub <rub@piwigo.org>2006-03-09 23:03:57 +0000
commit6163dccab341ae2d3ec7885224f512b99ca48b02 (patch)
treec3932984f478d4c595d4735804b7184268dc0ff1
parent15bb94715f8df7b084d2b25c655da9203116a357 (diff)
[NBM] Correction of sub-select query (remark about r1070)
git-svn-id: http://piwigo.org/svn/trunk@1074 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/mailtousers.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/admin/mailtousers.php b/admin/mailtousers.php
index 2ed9e3158..c2539a398 100644
--- a/admin/mailtousers.php
+++ b/admin/mailtousers.php
@@ -96,12 +96,12 @@ where
$query = '
select
- id user_id, username, mail_address
+ u.id user_id, u.username, u.mail_address
from
- '.USERS_TABLE.'
+ '.USERS_TABLE.' as u left join '.USER_MAIL_NOTIFICATION_TABLE.' as m on u.id = m.user_id
where
- mail_address is not null and
- id not in (select user_id from '.USER_MAIL_NOTIFICATION_TABLE.')
+ u.mail_address is not null and
+ m.user_id is null
order by
id;';