Find Jobs
Hire Freelancers

Help Completing GPS MySQL StoreProcedure Select Statement(repost)

$30-100 USD

Completed
Posted over 13 years ago

$30-100 USD

Paid on delivery
I need a MYSQL stored Procedure to take in 3 params: CREATE PROCEDURE `distance`(IN mymsgid int,IN user_id int, IN mydistance float) BEGIN declare mylon double; declare mylat double; SELECT latitude, longitude into mylat, mylon from USER WHERE id = user_id; SELECT id, ( 6371 * acos( cos( radians(mylat) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians(mylon) ) + sin( radians(mylat) ) * sin( radians( latitude ) ) ) ) AS distance FROM USER HAVING distance < mydistance ORDER BY distance LIMIT 0 , 20; END The code above returns ID and distance, but I need data from two tables joined by userid and msgid > mymsgid I have two tables I need joined that has a distance of myDistance. I will forward all the schemas once bidder is selected. Additional, if you have any GPS coordinate mysql experenice for faster queryies, if this is the best way to go. I do not plan on doing full table scans. I will send over the schemas
Project ID: 2976044

About the project

3 proposals
Remote project
Active 13 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$25.50 USD in 2 days
4.8 (8 reviews)
3.0
3.0
3 freelancers are bidding on average $31 USD for this job
User Avatar
See private message.
$59.50 USD in 2 days
5.0 (6 reviews)
2.5
2.5
User Avatar
See private message.
$8.50 USD in 2 days
5.0 (1 review)
1.3
1.3

About the client

Flag of UNITED STATES
United States
5.0
33
Member since Oct 24, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.