<html>
<body>
Muchas Gracias Réne,<br><br>
But I still have two problems:<br><br>
(1) I am using PostgreSQL/PostGIS on WinXP, so the DOS does not
differentiate "-p" from "-P"...<br>
any suggestion?<br><br>
(2) When I don't use a password to connect to the database, I receive the
following message:<br>
'FATAL: database "username" does not exist' , but
"username" is not the database, it is my username for this
computer.<br><br>
I'm trying:<br>
pgsql2shp -f test.shp database table<br><br>
Does someone have an advice?<br>
Thank you very much,<br>
Jorge<br>
 <br><br>
At 01:41 22.02.2006, you wrote:<br>
<blockquote type=cite class=cite cite="">Hi Jorge, you can try
this:<br><br>
<?<br>
$new_shp_filename = "...system_path/new.shp";<br>
$host = "localhost"; // or your host name or IP Adress<br>
$port = "5432"; // may be another<br>
$user = "postgres"; // or your postgres user <br>
$password = "*******"; // top secret :)<br>
$database_name = "gisdata"; // the database with the geomatries
and the tabular data<br>
$query = "SELECT some_geom_function(the_geom) AS the_geom, field1,
field2, ..., fieldN FROM table_name WHERE ... some condition";
<br><br>
exec("pgsql2shp -f $new_shp_filename -h $host -p $port -u $user -P
$password $database_name" \" $query \" ")<br><br>
?><br><br>
Best Regards from Chile<br><br>
René Felipe Viancos<br><br>
<br>
2006/2/21, Jorge Arigony
<<a href="mailto:arigony@web.de">arigony@web.de</a>>:<br>

<dl>
<dd>Hi listers,<br><br>

<dd>how can i export automatically each row from a query result to a
different new shape?<br><br>

<dd>I am using php to query the database from a browser.<br><br>

<dd>Thanks in advance,<br>

<dd>Jorge Arigony<br>

<dd>
______________________________________________________________________
<br>

<dd>XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im
<a href="http://WEB.DE">WEB.DE</a> Club!<br>

<dd>Jetzt gratis testen!
<a href="http://freemail.web.de/home/landingpad/?mc=021130">
http://freemail.web.de/home/landingpad/?mc=021130 </a><br><br>

<dd>_______________________________________________<br>

<dd>postgis-users mailing list<br>

<dd><a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a><br>

<dd>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" eudora="autourl">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br>

</dl><br><br>
<br>
-- <br>
René F. Viáncos S.<br>
Director de Geomática y TIC<br>
Vicerrectoría de Investigación y Desarrollo<br>
Universidad de Chile <br>
Tel (56-2) 632 62 09<br>
Cel (56 9) 933 72 66<br>
<a href="mailto:rviancos@uchile.cl">rviancos@uchile.cl</a><br>
<a href="mailto:rviancos@gmail.com">rviancos@gmail.com</a><br>
<a href="http://www.investigacion.uchile.cl">
www.investigacion.uchile.cl</a> <br>
_______________________________________________<br>
postgis-users mailing list<br>
postgis-users@postgis.refractions.net<br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" eudora="autourl">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</blockquote></body>
</html>