Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $conn = pg_connect("host=localhost dbname=postgis user=$user password=$password");
- $sql = "INSERT INTO carto_doodle (poly_geom) VALUES
- (ST_SetSRID
- (ST_GeomFromGeoJSON
- ({"type":"Feature",
- "properties":{},
- "geometry":{"type":"Polygon",
- "coordinates":
- [[[-74.54635620117188,40.773261878622634],
- [-74.69741821289062,40.61082491956405],
- [-74.30740356445312,40.61603737424185],
- [-74.54635620117188,40.773261878622634]]]
- }
- })
- ),
- 4326)"
- $success = pg_query($conn, $sql);
- Warning: pg_query(): Query failed: ERROR: syntax error at or near "{" LINE 1: ...(poly_geom) VALUES (ST_SetSRID(ST_GeomFromGeoJSON({"type":"F... ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement