From: "Pete Lancashire"
> update fooloc set location = geomfromtext('point(lat lon)');
I have no experience with spatial tables, but from the manual I conclude
that either of these should do the job:
UPDATE `fooloc` SET `location` = GeoFromWKB(point(`lat`, `lon`));
or
UPDATE `fooloc` SET `location` = GeoFromText(CONCAT( 'POINT(', `lat`, '
', `lon`, ')'));
Since there is no WHERE clause, all records in the table will be updated.
Further reading:
http://dev.mysql.com/doc/mysql/en/gis-wkt-functions.html
http://dev.mysql.com/doc/mysql/en/gis-wkb-functions.html
http://dev.mysql.com/doc/mysql/en/gis-mysql-specific-functions.html
http://dev.mysql.com/doc/mysql/en/populating-spatial-columns.html
Regards, Jigal.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]