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 6966285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:10:19+00:00 2026-05-27T16:10:19+00:00

I was searching stackoverflow and got an answer to my question, but when I

  • 0

I was searching stackoverflow and got an answer to my question, but when I tried to implement it with my code I got weird errors.

here is the code:

SELECT `zip_code`, (6371 * acos(cos(radians($latitude)) * cos(radians(`lat`)) * cos(radians(`long`) - radians($longitude)) + sin(radians($latitude)) * sin(radians(`lat`)))) AS `distance`
FROM `places`
HAVING `distance` < $within
ORDER BY `distance` ASC
LIMIT 10;

I get the following error:

Incorrect parameter count in the call to native function 'radians'

I use MySQL version 5.1.44

  • 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-27T16:10:20+00:00Added an answer on May 27, 2026 at 4:10 pm

    From the links I found, this is usually caused by passing degree arguments to the radians function with commas separating the whole number from the decimal part of the degree value.

    53,779 degrees longitude
    4,566 degrees latitude

    This looks like two arguments (separated by a comma) to the radians function and it throws the error you see.

    The solution is to do some on the fly modification to format your degree arguments with period as the separator instead of commas.

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

Sidebar

Related Questions

Searching here I found that this question was already asked , but I think
I have been searching in StackOverflow, but I only got so far this website
I got this code after searching around on stack overflow and it should work,
After searching stackoverflow.com I found several questions asking how to remove duplicates, but none
First of all: I have fruitlessly tried searching Stackoverflow.com for any clues on my
i was searching in stackoverflow and the only thing i got is something like
Searching on Stackoverflow and writing this question has taken more time than the change
I have tried to find the answer to this question on both the Spring
I asked this in spring forums but got no answer, and I just discovered
I am still searching StackOverFlow as well as the innertubes but have not found

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.