Support the ongoing development of →
Database Eloquent
Last updated 2 years ago.

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 2 years ago.

Sign in to participate in this thread!


Your banner here too?

azcoppen azcoppen Joined 15 Mar 2014


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

Your logo here?

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

© 2024 - All rights reserved.