SELECT id, ( 6371 * ACOS( COS( RADIANS( db_latitude ) ) * COS( RADIANS( $user_latitude ) ) * COS( RADIANS( $user_longitude ) -
I have a order table that refers to status table by foreign key status_id: $ select order_id, status_id from "order"; order_id | status_id ----------+-------
I have a order table that refers to status table by foreign key status_id: $ select order_id, status_id from "order"; order_id | status_id ----------+-------