what is wrong with my code?
$this->db->query(“update profile set polygon = POLYGON((0 0,82 33,23
66,0 0)) where id = 1”);
polygon is a column with type of geometric(polygon).
i paste this “POLYGON((0 0,82 33,23 66,0 0))” in that column in phpmyadmin and it is saved but wuth query it in not work
2
Answers
I found the answer
Try this – it uses Query Builder (part of Codeigniter) of which I am a fan!!
Note the
false
stops CI from quoting/escaping your query. Obviously if you accept user supplied information in there – then this would have to be checked for SQL injection elsewhere or this query amended.