Folloing a number of suggestions from various people I tried
ammending my original code and now have:-
<HTML>
<HEAD>
<TITLE>pg_test</TITLE>
</HEAD>
<BODY>
<?
$connectid = pg_connect("194.164.53.200", "5432", "postgres");
$query = "SELECT townName FROM towns";
$result = pg_exec($connectid, $query);
$row = pg_fetch_array($result,$row);
print("using element 0 :- \n");
print($row[0]);
print("<BR>");
print("using double quotes :- \n");
print($row["townName"]);
print("<BR>");
print("using single quotes :- \n");
print($row['townName']);
print("<BR>");
print("using no quotes :- \n");
print($row[townName]);
print("<BR>");
print("using printf :- \n");
printf("%s\n",$row->townName);
print("<BR>");
?>
And this is what the output looks like:-
using element 0 :- leeds
using double quotes :-
using single quotes :-
using no quotes :-
using printf :-
So I'm no wiser reallly...
Can anyone try running this snippet on their own system and show
me what happens?
It's coded to point at an host which _ought_ to be able to
service a query.
--
John