[postgis-users] Quote problem in query
pramsey at refractions.net
Mon Apr 24 06:37:00 PDT 2006
You need the single quotes for the SQL (') so escape the double
quotes in the DATA statement instead...
$php = "DATA \"the_geom from (SELECT ... WHERE this = 'that') as foo\""
On 24-Apr-06, at 5:47 AM, Barend Köbben wrote:
> I am not sure about PhP (never use it myself), but in most script
> and programming langauges I do know, you can 'escape' the quote ,
> usually by putting a \ in front, so your string could be
> " WHERE table.id = other_table.id AND table.name = \"Algeria\")
> AS foo USING UNIQUE uid USING srid=-1"
> If this does not work, check a PhP tutorial/book on how to escape
> characters in strings...
> Barend Köbben
> International Institute for Geo-information
> Sciences and Earth Observation (ITC)
> PO Box 6, 7500AA Enschede (The Netherlands)
> ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users