Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3404196
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:21:10+00:00 2026-05-18T05:21:10+00:00

Hey all… I’ve been tasked with a global search project. They want to search

  • 0

Hey all…
I’ve been tasked with a global search project.
They want to search a database of pictures, all with long/lat
references storied per image in a mysql DB.

However, their search criteria is a little specific.

A simplified table structure is:
id INT auto inc primary
imagePath varchar 255
long DECIMAL 12,7
lat DECIMAL 12,7

I need to provide the SQL statement with a start long/lat position.
They then want to receive 34 images, going south from their initial
long reference.. once they get to -90 (the bottom of the earth) to pop
over 1 degree to the right/East and search up to the north to 90 and
repeat until 34 images are found.

What’s confusing me is how to calculate the minus to plus changes..
ensuring that we loop up and down along the earths ‘long’ reference.

Has anyone done this before..?
I’d LOVE to do it in a single query…
(I’ve seen how one can fetch results based on a circle radius, but my client.. bless em.. doesn’t want to do that)

Ok, back to google!!

Thoughts…

Tris…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:21:10+00:00Added an answer on May 18, 2026 at 5:21 am

    Inputs are $the_lat and $the_long

    SELECT * 
    FROM table
    WHERE long > $the_long
    OR ( long = $the_long AND lat >= $the_lat)
    ORDER BY long ASC, lat ASC
    LIMIT 34
    

    As is, it’s a uni-directional search — it won’t wrap around to longs < $the_long.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all, I want to change a value in a table (in a mysql
Hey all i have a JSFiddle that i have been working on with trying
Hey all - I have an app where I'm authenticating the user. They pass
Hey all. I am working on a project for school where we are given
Hey all. I've been been trying to figure this out for a while now.
Hey all. To be honest, I don't prefer MS Access as a relational database
Hey all I want to reseed my IDENTITY COLUMN values starting from 1 I
Hey all. I'm working on a project for school where I need to pass
hey all, I'm very confused here, i've been trying to figure this one out.
Hey all, I'm writing a C program, and I want to have an array

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.