I would use:
$query = "select table.user from table LEFT JOIN table2 ON
table.user=table2.user where table2.user is NULL";
This will return every member of user which is present in table but not in
table2.
>From there you can do pretty much whatever you want with it in PHP
Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com
----- Original Message -----
From: "Tom Churm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 24, 2001 8:52 AM
Subject: [PHP] comparing 2 mysql tables
> hi,
>
> i've got 2 different MySQL tables. i need to check which entries in the
> text-field 'User' in one table are NOT present in the 'User' field in
> the other table. then i need to either save this array to a textfile or
> otherwise prepare it for creating a new, third table.
>
> any hints on how this kind of comparison operation can be accomplished?
>
> many thanks,
>
> tom
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]