<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="GENERATOR" content="MSHTML 8.00.6001.19046">
</head>
<body>
<div><font size="2" face="Arial"><span class="024213009-19052011">Hi,</span></font></div>
<div><font size="2" face="Arial"><span class="024213009-19052011"></span></font>&nbsp;</div>
<div><font size="2" face="Arial"><span class="024213009-19052011">I am trying to export spatial data from a Postgres/PostGIS table with upper-case field names&nbsp;by calling ogr2ogr from PHP shell_exec(). I am currently working on a Windows XP machine, but also
 need to port to LINUX.</span></font></div>
<div><font size="2" face="Arial"><span class="024213009-19052011"></span></font>&nbsp;</div>
<div><font size="2" face="Arial"><span class="024213009-19052011">I&nbsp; know I have to escape double qoutes, but have so far have not worked out how to do this correctly.</span></font></div>
<div><font size="2" face="Arial"><span class="024213009-19052011"></span></font>&nbsp;</div>
<div><font size="2" face="Arial"><span class="024213009-19052011">The following works at the command line but fails when called with PHP shell_exec()</span></font></div>
<br>
<font size="2" face="Arial">&quot;C:\FWTools2.4.7\bin\ogr2ogr&quot; -f &quot;ESRI Shapefile&quot; test.shp PG:&quot;<span class="024213009-19052011">&lt;connect_str&gt;</span>&quot; -sql &quot;SELECT * FROM gpdd.location_pt WHERE \&quot;LocationID\&quot; = ANY(Array[1,2,3])&quot;</font>
<div><font size="2" face="Arial"><span class="024213009-19052011"></span></font>&nbsp;</div>
<div><font size="2" face="Arial"><span class="024213009-19052011">I have tried escaping the slashes with one or two preceeding shashes but to no avail.</span></font></div>
<div><font size="2" face="Arial"><span class="024213009-19052011"></span></font>&nbsp;</div>
<div><font size="2" face="Arial"><span class="024213009-19052011">Any suggestions greatly appreciated. Thanks,</span></font></div>
<div><font size="2" face="Arial"><span class="024213009-19052011"></span></font>&nbsp;</div>
<div><font size="2" face="Arial"><span class="024213009-19052011">&nbsp;- Dave</span></font></div>
<div><font size="2" face="Arial"><span class="024213009-19052011"></span></font>&nbsp;</div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<!-- Converted from text/plain format -->
<p align="left"><font size="2">David M. Kidd</font></p>
<p align="left"><font size="2">Research Associate<br>
Center for Population Biology<br>
Silwood Park Campus<br>
Imperial College London<br>
0207 594 2470</font></p>
<div>&nbsp;</div>
</body>
</html>