Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 1 year ago.
0

really it is a great article, i was looking for like.

But i have one problem with my table and i was stuck in spatial query for it.

description of my table is like this

field – type

—————-

id – int (10)

property – geometry

in property field we stored latitude and longitudes as POINT type. (select astext(property) from mytable; will return POINT(12.000 77.0000))

how to apply haversine formula as you mentioned on mytable?

do i need to extract lat lon values first and apply your query after? (i tried select X(coordinates),Y(coordinates) from mytable; but ended up with unknown column coordinates error) or is there any direct way to apply haversine formula on mytable?

thank you

Last updated 1 year ago.
0

Hey, did you found any answers about this? I have a similar problem http://laravel.io/forum/09-16-2015-select-raw-inside-eager-loa...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

azcoppen azcoppen Joined 15 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.