I've got two scenarios, using the following statement:
INSERT INTO areas (name, polygon) VALUES (开发者_如何学编程?, POLYGON(?,?,?,?,?,?))
Will result in errors like this:
Illegal non geometric ''58.03665463092348 14.974815566795314'' value found during parsing
What seems to be the problem here is that my lat and longitudes are quoted as texts within the POLYGON().
However,according to the WKT format I need another set of () in my statement:
INSERT INTO areas (name, polygon) VALUES (?, POLYGON((?,?,?,?,?,?)))
which will only result in the following error:
Operand should contain 1 column(s)
I'm at a loss here, how do I use prepared statements along with mysql spatial information?
精彩评论