I have a bit of a strange problem. I’m trying to insert MySQL point coordinates and return in PHP, but I get ASCII put instead of coordinates.
This is my SQL
CREATE TABLE `Grid` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`cntr_point` POINT DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=INNODB;
INSERT INTO `Grid`(cntr_point)
VALUES(POINTFROMTEXT('POINT(49.227239 17.564932)'));
In PHP I have code such as this (which works for other fields):
$row['cntr_point']
But I get random ASCII character output such as this:
*H@v0b1@
When I would instead be expecting to see the coordinates I inserted. I seem to get the same even when I skip PHP and use something like SQLFiddle: