> I may have not explained the setup properly. I don't actually have a > "full_name" field in either table (import_contacts and contacts are > the actual MySQL table names). Each of these tables have "fn" and "ln" > fields, however. So the problem is that I need to somehow find all > records in the contacts table which have the same values in the "fn" > and "ln" fields as the import_contacts table.
That should still be able to be handled pretty easily with SQL. You got me interested so I created a test DB formatted like you said (first_name, last_name) and this query works fine. Only spits out the dupes (when first and last names are the same, if one of the two is different it doesn't show up): SELECT * FROM contactImport WHERE first_name IN (SELECT first_name FROM contact) AND last_name in (SELECT last_name FROM contact) b logica's way would work too, so you could just check whatever is faster. I don't have 30,000 records to test that out on :P. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
