>
>
>Hi all
>
>There's probably a simple answer to this but I can't find it and it's 
>doing my head in.
>
>I have two tables:
>main contains user data, address,name,etc.
>activity contains user activity
>
>'user' in main has the same value as 'id' in activity
>
>I want to produce a list of users who have not been active, i.e. pull 
>all the data for users in main who do NNOT appear in activity
>
>I've tried running the following sql
>
>select * from main as t1, activity as t2 where t1.user !=  t2.id;
>select * from main left join activity on main.user = activity.id
>select @id:=id from activity; select * from main where user != @id;
>
>But each query produces near identical results - more or less a dump of main.
>
>Any ideas gratefully rec'd.
>
>Thanks
>
>Steve Davies
>
>  
>



---------------------------------------------------------------------
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

Reply via email to