johnsmith153 Posted October 22, 2010 Share Posted October 22, 2010 Table 1 Name / ID Dave / 1 John / 2 Steve / 3 Table 2 ID / Lat / Long / region 1 / 32.0054 / -3.4562 / 1 1 / 27.5054 / -23.4563 / 1 1 / 66.8734 / 1.8764 / 2 2 / 34.4474 / -2.4562 / 1 I need it to return ALL people that have records in table 2 and have a matching region - but I want only one record (LEFT JOIN) but so an array of all right (table 2) table records are returned When selecting region 1, it returns... Dave = array of 32.0054,-3.4562 & 27.5054 / -23.4563 John = just 34.4474 / -2.4562 Quote Link to comment https://forums.phpfreaks.com/topic/216559-select-left-join-return-array-of-right-table-as-well/ Share on other sites More sharing options...
johnsmith153 Posted October 22, 2010 Author Share Posted October 22, 2010 http://www.sitepoint.com/forums/showthread.php?p=4722454#post4722454 Quote Link to comment https://forums.phpfreaks.com/topic/216559-select-left-join-return-array-of-right-table-as-well/#findComment-1125352 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.