Jump to content

SELECT LEFT JOIN (return array of right table as well?)


johnsmith153

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.