代码拉取完成,页面将自动刷新
select a.id,a.top,a.notice,a.elite,a.position,a.longitude,a.latitude,a.transpondNum,a.content,a.userId,a.saveTime,b.name,b.photo,c.content as transpondContent,a.transpondId,d.id as transpondUserId,d.name as transpondName from copying_circle_art as a inner join total_user as b on a.userId = b.id left join copying_circle_art as c on a.transpondId = c.id left join total_user as d on c.userId = d.id where a.longitude > 115.340000 and a.longitude < 117.340000 and a.latitude > 36.550000 and a.latitude < 38.550000 order by ACOS(SIN((37.550000 * 3.1415) / 180 ) * SIN((a.latitude * 3.1415) / 180 ) + COS((37.550000 * 3.1415) / 180 )* COS((a.latitude * 3.1415) / 180 ) * COS((116.340000* 3.1415) / 180 - (a.longitude * 3.1415) / 180 )) * 6380 asc
上面的这个语句用find就可以 使用paginate()只把 order by ACOS(SIN((37.550000匹配为空了
paginate()结果
Sql: select count(*) from copying_circle_art as a inner join total_user as b on a.userId = b.id left join copying_circle_art as c on a.transpondId = c.id left join total_user as d on c.userId = d.id where a.longitude > 115.340000 and a.longitude < 117.340000 and a.latitude > 36.550000 and a.latitude < 38.550000 * 3.1415) / 180 ) * SIN((a.latitude * 3.1415) / 180 ) + COS((37.550000 * 3.1415) / 180 )* COS((a.latitude * 3.1415) / 180 ) * COS((116.340000* 3.1415) / 180 - (a.longitude * 3.1415) / 180 )) * 6380 asc
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
去除 order by 后面条件的空格可以了
登录 后才可以发表评论