halo ihr,
ich bin absolut neu in postgresql und habe ich schon probleme beim ersten Versuch.
Ich bekomme folgende Fehler meldungen:
Warning: pg_query(): Query failed: FEHLER: keine Berechtigung für Relation information in /var/www/apache2-default/test.php on line 13
Warning: pg_numrows(): supplied argument is not a valid PostgreSQL result resource in /var/www/apache2-default/test.php on line 14
mein code ist:
Code:
<html>
<head>
<title> Test </title>
</head>
<body bgcolor="white">
<?
$link = pg_connect("dbname=adressbuch user=test password=test");
if($link == FALSE)
{
print "Konnte Datenverbindung nicht aufbauen";
exit();
}
$result = pg_query($link, "SELECT * FROM information");
$numrows = pg_numrows($result);
?>
<table border="1">
<tr>
<th> Vorname </th>
<th> Nachname </th>
<th> Adresse </th>
</tr>
<?
// Loop on rows in hte result set.
for($ri=0;$ri<$numrows;$ri++){
echo "<tr>\n";
$row = pg_fetch_array($result,$ri);
echo "<td>", $row["vorname"], "</td>
<td>", $row["nachname"], "</td>
<td>", $row["adresse"], "</td>
</tr>";
}
pg_close($link);
?>
</table>
</body>
</html>
Kann jemand mir helfen? ich danke ihr für jede Hilfe.