In php to connect to PostgreSQL/PostGIS

// connect to database

$conn_string = "host=xxx port=5432 dbname=vd2006 user=xxx password=xxx";
$dbconnect = pg_connect($conn_string);

$result = pg_query($dbconnect, 'SELECT COUNT(*) FROM xxx');

$row = pg_fetch_row($result);

regards,

eb

VenuGopal Papasani wrote:
Hi all,
I need to get the map data into my plugin in order to access that data.Can any one give me the method how to get the map data and i need total no of records in the map database.How to get these values from a plugin.And also can u give me the method how to connect to a map database.If there is any possibility please try to explain with an example.
    Thanks in advance.

Regards,
venu.


------------------------------------------------------------------------

_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users
begin:vcard
fn:Emmanuel Belo
n:Belo;Emmanuel
org:MicroGIS SA
adr:;;ch. des Jordils 40;St-Sulpice;VD;1025;Switzerland
email;internet:[EMAIL PROTECTED]
title;quoted-printable:Ing=C3=A9nieur en g=C3=A9omatique
tel;work:+41 21 691 77 17
tel;fax:+41 21 691 77 86
x-mozilla-html:FALSE
url:http://www.microgis.ch
version:2.1
end:vcard

_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to