SELECT DISTINCT u.userid, IF( ul.listid, true, false)
FROM user u LEFT OUTER JOIN userlist ul ON u.userid = ul.userid
AND ul.listid = listid;
-Original Message-
From: David Otton [mailto:[EMAIL PROTECTED]]
[EMAIL PROTECTED] writes: [snipped fscking ML bullshit]
database,sql,query,table
David Otton writes:
Users that belong to some lists, but not the one I'm interested in :
this is the one that I'm stuck on. Any thoughts? Suggestions?
SELECT DISTINCT userid FROM userlist WHERE
Hi.
On Mon, Sep 10, 2001 at 02:38:56PM -0700, [EMAIL PROTECTED] wrote:
[...]
I need to find, for each user, whether they are a member of list n :
++--+
| userid | memberoflist |
++--+
| 1 | true |
| 2 |false |
| 3 |