为什么我不能插入MySQL?

时间:2010-02-15 15:45:16

标签: mysql geospatial spatial mysql-error-1416

+---------+---------+------+-----+---------+----------------+
| Field   | Type    | Null | Key | Default | Extra          |
+---------+---------+------+-----+---------+----------------+
| id      | int(11) | NO   | PRI | NULL    | auto_increment |
| user_id | int(11) | NO   | UNI | NULL    |                |
| utm     | point   | NO   | MUL | NULL    |                |
+---------+---------+------+-----+---------+----------------+

insert into life(user_id, utm)  values(99,point(4,4));

ERROR 1416 (22003): Cannot get geometry object from data you send to the GEOMETRY field

1 个答案:

答案 0 :(得分:5)

你试过了吗?

insert into life(user_id, utm)  values(99,PointFromWKB(POINT(4,4)));
相关问题