ioustinos_sarris
asked on
PhpMyAdmin Edit record that contains a polygon field
Hi there,
I have a table that one of its fields is a POLYGON
I manage to insert a polygon quite fine like this
INSERT INTO polygons_region VALUES ("test", GeomFromText('POLYGON((4.9 7141067864 157 44.4269927920504,4.9602656 138422 44.4171284166614,4.9562222 293031 44.4171081193899,4.9524924 246148 44.4160004581088,4.9714106 7864157 44.4269927920504))'));
Then if i go to phpmyadmin to edit this record i get this weird value for the polygon (i guess its an encpoded string) http://o7.no/uBHhxx
And then if i try to edit the name through the interface of phpmyadmin from test to test1 i get this error http://o7.no/vmemRO
Weird, any solutions? Is this something that phpmyadmin should fix? Should i report to them?
I have a table that one of its fields is a POLYGON
I manage to insert a polygon quite fine like this
INSERT INTO polygons_region VALUES ("test", GeomFromText('POLYGON((4.9
Then if i go to phpmyadmin to edit this record i get this weird value for the polygon (i guess its an encpoded string) http://o7.no/uBHhxx
And then if i try to edit the name through the interface of phpmyadmin from test to test1 i get this error http://o7.no/vmemRO
Weird, any solutions? Is this something that phpmyadmin should fix? Should i report to them?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
CREATE TABLE IF NOT EXISTS `territories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`city_id` int(11) NOT NULL,
`name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`status_update` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`owner_id` int(11) NOT NULL COMMENT '0 for no owner',
`bounds` polygon NOT NULL,
`visits_foursquare` int(11) NOT NULL,
`visits_fb` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=489 ;
I have entered the data in the database in that manner
INSERT INTO territories (`city_id`,`bounds`) VALUES (10,GeomFromText('POLYGON( (38.150317 15029785 38.140697756155376,23.7624 3898445049 8 38.140697756155376,23.7624 3898445049 8 23.750227585156292,38.1503 1715029785 23.750227585156292,38.1503 1715029785 38.140697756155376))'));
`id` int(11) NOT NULL AUTO_INCREMENT,
`city_id` int(11) NOT NULL,
`name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`status_update` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`owner_id` int(11) NOT NULL COMMENT '0 for no owner',
`bounds` polygon NOT NULL,
`visits_foursquare` int(11) NOT NULL,
`visits_fb` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=489 ;
I have entered the data in the database in that manner
INSERT INTO territories (`city_id`,`bounds`) VALUES (10,GeomFromText('POLYGON(
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yeah i know how to get the information in php.
The problem is that i need to be editing some of the entries via phpmyadmin and i cannot.
The problem is that i need to be editing some of the entries via phpmyadmin and i cannot.
You're right, you can not. You will have to get the information in PHP, edit it as text, and then update the row.
Thanks