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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:26:29+00:00 2026-06-11T16:26:29+00:00

basically I have a database that is setup in Longitude and Latitude. I have

  • 0

basically I have a database that is setup in Longitude and Latitude. I have been trying for hours now to fix an issue I have with MySql and I can not find my error. Here is the error I am getting:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘€“ longitude) * PI() / 180))* 180 / PI()) * 60 * 1.1515)*1.609344) AS distance’ at line 1

Here is MySql database query to get the distances from long and lat:

$res = mysql_query("SELECT *, (((ACOS(SIN(".$latitude." * PI() / 180) * SIN(latitude *
 PI() / 180) + COS(".$latitude." * PI() / 180) * COS(latitude * PI() / 180) * 
COS((".$longitude." – longitude) * PI() / 180))* 180 / PI()) * 60 * 1.1515)*1.609344) 
AS distance") or die(mysql_error());

Please please please help!!!

  • 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-06-11T16:26:30+00:00Added an answer on June 11, 2026 at 4:26 pm

    The minus-sign looking character at which the error occurs doesn’t appear to be a minus-sign. Perhaps you used Word (or a similar “helpful” editor) to construct the query, and it substituted a “smart” version of a minus-sign, like an en-dash?

    I replaced that character with a proper minus sign and the query worked.

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

Sidebar

Related Questions

Basically I have a database with two tables, that is, Updates table and Images
Let's say I have a Type II SCD database, that is basically append only.
I have a C# program that works with an SQL Server database. The setup
I have a class I'm unit testing that requires fairly extensive database setup before
Ok..... basically what I'm trying to do is setup something that will handle all
basically i have a database, which contains a random amount of questions i have
So! Basically I have a database with a load of blog posts, these are
Basically I have a simple login form. In the database I have a 'last_logged'
We have a registration system Database and basically what this query does is check
I have to design a database to handle forms. Basically, a form needs to

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.