On 12/13/10 2:16 AM, A.L.E.C wrote:
> On 12.12.2010 01:27, John May wrote:
>
>>> SELECT COUNT(*) FROM identities WHERE user_id NOT IN (SELECT user_id
>>> FROM users);
>>
>> 1
>>
>>> SELECT COUNT(*) FROM contacts WHERE user_id NOT IN (SELECT user_id
>>> FROM users);
>>
>> 56
>
> So, you have some records that shouldn't be there. You can delete them with
>
> DELETE FROM identities WHERE user_id NOT IN (SELECT user_id FROM users);
> DELETE FROM contacts WHERE user_id NOT IN (SELECT user_id FROM users);
>


Worked now - thanks!

        - John

-- 

-------------------------------------------------------------------
John May : President                   http://www.pointinspace.com/
Point In Space Internet Solutions             [email protected]

              Twitter: http://twitter.com/pointinspace/
            Facebook: http://www.facebook.com/PointInSpace/

         Professional FileMaker Pro, MySQL, PHP & Lasso Hosting
           on shared, virtual and hardware dedicated servers

_______________________________________________
List info: http://lists.roundcube.net/users/
BT/8f4f07cd

Reply via email to