Alternative solution (using MySQL-specific GROUP_CONCAT()): SELECT Person.id, Person.name, GROUP_CONCAT(city) AS Cities FROM Person, Address WHERE Address.belongs_to = Person.id GROUP BY Person.id HAVING Cities LIKE '%Wellington%' AND Cities LIKE '%Auckland%' ;
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" 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/nzphpug?hl=en -~----------~----~----~----~------~----~------~--~---
