Home >Backend Development >PHP Tutorial >mysql 空间数据类型(point)如何在查询后解释出?

mysql 空间数据类型(point)如何在查询后解释出?

WBOY
WBOYOriginal
2016-06-06 20:35:071498browse

如题,最近在学习mysql关于gis方面的东西,建立了point类型的字段后插入成了point(x,y),但是在php中打印却成了乱码,请问如何将point类型的数据正确取出?

回复内容:

如题,最近在学习mysql关于gis方面的东西,建立了point类型的字段后插入成了point(x,y),但是在php中打印却成了乱码,请问如何将point类型的数据正确取出?

用以下方法可以得到非乱码:
select AsText(point) from T;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn