2010-02-15 113 views
5
+---------+---------+------+-----+---------+----------------+ 
| 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 

回答

5

你試過:

insert into life(user_id, utm) values(99,PointFromWKB(POINT(4,4))); 
+3

根據http://bit.ly/9r97o5,這僅僅是5.1.35需要對MySQL的版本之前。從5.1.35開始,您可以直接從Point()插入返回值。 –

+0

mySQL中的函數名是否區分大小寫? –

+4

你的意思是MySQL嗎? :d – huff

相關問題