# MySQL查询附近 **Repository Path**: helongding/my-sql-query ## Basic Information - **Project Name**: MySQL查询附近 - **Description**: No description available - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-01-14 - **Last Updated**: 2021-01-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README where("is_business",1) //->where("distance",'<=',30) ->having('distance','<','31') ->orderBy('distance') ->offset(($page-1)*$limit) ->limit($limit)->get();; //mysql 原生语句 SELECT * , (st_distance (point (lnt, lat),point(".$lat_lnt[0].",".$lat_lnt[1].") ) * 111201.785788519) / 1000 AS distance FROM post_post"