Hi all,
I am trying to display records from a psql database to the web browser, unfortunatly, it displays the following error message:-
Parse error: parse error in /home/httpd/business/customerlist.php on line 18
Here is my code:-
$db = pg_connect("host=larry port=4132 dbname=business_db user=httpd password=test"
if (!$db) {printf ("Error: Unable to access Database" exit; }
$query = "SELECT * FROM customers";
$result = pg_exec($db, $query);
if (!$result) {printf ("ERROR" exit;}
$numrows = pg_numrows($result);
$row=0;
printf ("<table border=1>\n"
printf ("<tr><td>ID</td><td>Customer Name</td><td>Fleet</td><td>Fleet Ref.</td><td>End User</td></tr>\n"
do
{
$myrow = pg_fetch_row ($result,$row);
printf ("<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n", $myrow[1],
$myrow[2], $myrow[3],);
$row++;
}
while ($row < $numrows);
printf ("</table>\n"
pg_close($db);
?>
ANY IDEAS WHATS WRONG WITH IT?......UR HELP IS GREATLY APPRECIATED.
I am trying to display records from a psql database to the web browser, unfortunatly, it displays the following error message:-
Parse error: parse error in /home/httpd/business/customerlist.php on line 18
Here is my code:-
$db = pg_connect("host=larry port=4132 dbname=business_db user=httpd password=test"
if (!$db) {printf ("Error: Unable to access Database" exit; }
$query = "SELECT * FROM customers";
$result = pg_exec($db, $query);
if (!$result) {printf ("ERROR" exit;}
$numrows = pg_numrows($result);
$row=0;
printf ("<table border=1>\n"
printf ("<tr><td>ID</td><td>Customer Name</td><td>Fleet</td><td>Fleet Ref.</td><td>End User</td></tr>\n"
do
{
$myrow = pg_fetch_row ($result,$row);
printf ("<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n", $myrow[1],
$myrow[2], $myrow[3],);
$row++;
}
while ($row < $numrows);
printf ("</table>\n"
pg_close($db);
?>
ANY IDEAS WHATS WRONG WITH IT?......UR HELP IS GREATLY APPRECIATED.