Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Nigel Peck (nigel.peckmiswebdesign.com)
Date: Fri Mar 13 2009 - 14:17:50 CDT
I'm hoping someone can point me in the right direction for what I need,
to save me trawling through books and Google when I don't know what I'm
I'm using an INNER JOIN to query a table that has a one-to-many
relationship with the table in my FROM clause, but I only want one
result in the result set per record in the table in my FROM clause,
rather than multiple results if there are multiple matching records in
the JOINed table.
I'm just not sure how to do that (or rather can't remember!).
My query is:
`Person_postal_addresses`.`person_id` = `People`.`person_id`
`People`.`name` REGEXP 'example'
`Person_postal_addresses`.`address` REGEXP 'example'
How do I alter that to get one result per matching row in the People
table? When there are multiple matches, for one row in People, for:
`Person_postal_addresses`.`address` REGEXP '1'
Thanks in advance,
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql