我有下一个结构的表:
CREATE TABLE IF NOT EXISTS `points` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`coordinates` point NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
在PointsTable.php中有类似的东西:
public function beforeSave( $event, $entity, $options) {
$entity->coordinates = new QueryExpression('GeomFromText(\'POINT(' . $entity['latitude'] . " " . $entity['longitude'] . ')\')');
}
所以,我不明白,如何检索lat,lon坐标来查看来自坐标的文件。