[mapserver-users] php/sql quote problem
Tim Sutton
sutton_t at giug.net
Tue Dec 11 08:36:47 PST 2001
Hi
I am not sure about newer versions of postgres, but this may apply to
them too: Postgres is quite picky about how you name your fields. It
is prefereable to use all lower case and separate with underscores
e.g. GeometryFromText would be better written as geometry_from_text.
You _can_ still use mixed case, but then postgres expects all mixed
case field names to be quoted so "GeometryFromText" would be
acceptable. Doing it that way can be a real pain because it means you
have to escape out every quote e.g.
$sql="insert into popplace_table (name, the_geom) values ('$stadnaam',
'\"GeometryFromText\"(''POINT($geox $geoy)'', 312)')";
Hope that helps
regards
--
-----------------------------------------------------
Tim Sutton WRc plc
Consultant, GIS Solutions Group Frankland Road
Direct line: +44 (0) 1793 865056 Blagrove
Switchboard: +44 (0) 1793 865000 Swindon
Fax: +44 (0) 1793 865001 Wiltshire SN5 8YF
United Kingdom
WRc - Solutions for Water, Waste and the Environment
-----------------------------------------------------
More information about the MapServer-users
mailing list