Victor Kirk wrote: >>If so, this should work: >> >> SELECT u.uname >> FROM users u >> LEFT JOIN team_members t ON u.user_id =3D t.user_id >> AND t.team_id =3D 7 >> WHERE t.team_id is NULL >> >> > >Perfect :-) thanks very much this query works perfectly, you are a star. > > I'd like to take this opportunity to point out that there is a sql-general list hosted by Yahoo! that is quite good for generic SQL query questions, although they usually won't deal with issues like "I can't use LEFT JOINs" the way this list will. The point, though, is that I've found a lot of good suggestions there and learned a lot about forming good SQL queries.
-- Michael T. Babcock C.T.O., FibreSpeed Ltd. http://www.fibrespeed.net/~mbabcock --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php