Display items by location. Mysql Select

Mil

New Member
I have two MySQL tables, "locations" and items":\[code\]locations `id` `name` `address` `latitude` `longitude`\[/code\]Now I use a MySQL SELECT that allows a user to enter in their latitude and longitude and it will sort the locations by distance. That works perfect.Now I have a list of items:\[code\]items `id` `location` `title` `description` `display`\[/code\]Now I want to display the items for each location if the \[code\]display\[/code\] of that item = true. I want this is be efficient, because some locations don't have any items, or no items set to \[code\]display\[/code\] = true.
 
Back
Top