mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Get rid of endwhile
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@64471 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e953ab37e2
commit
9b7ade58f4
1 changed files with 12 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.52 $ -->
|
||||
<!-- $Revision: 1.53 $ -->
|
||||
<reference id="ref.pgsql">
|
||||
<title>PostgreSQL functions</title>
|
||||
<titleabbrev>PostgreSQL</titleabbrev>
|
||||
|
@ -593,29 +593,32 @@ endif;
|
|||
$qu = pg_exec ($db_conn, "SELECT * FROM verlag ORDER BY autor");
|
||||
$row = 0; // postgres needs a row counter other dbs might not
|
||||
|
||||
while ($data = pg_fetch_object ($qu, $row)):
|
||||
while ($data = pg_fetch_object ($qu, $row)) {
|
||||
echo $data->autor." (";
|
||||
echo $data->jahr ."): ";
|
||||
echo $data->titel."<BR>";
|
||||
$row++;
|
||||
endwhile; ?>
|
||||
|
||||
<PRE><?php
|
||||
}
|
||||
?>
|
||||
<PRE>
|
||||
<?php
|
||||
$fields[] = Array ("autor", "Author");
|
||||
$fields[] = Array ("jahr", " Year");
|
||||
$fields[] = Array ("titel", " Title");
|
||||
|
||||
$row= 0; // postgres needs a row counter other dbs might not
|
||||
while ($data = pg_fetch_object ($qu, $row)):
|
||||
while ($data = pg_fetch_object ($qu, $row)) {
|
||||
echo "----------\n";
|
||||
reset ($fields);
|
||||
while (list (,$item) = each ($fields)):
|
||||
echo $item[1].": ".$data->$item[0]."\n";
|
||||
endwhile;
|
||||
$row++;
|
||||
endwhile;
|
||||
echo "----------\n"; ?>
|
||||
</PRE> <?php
|
||||
}
|
||||
echo "----------\n";
|
||||
?>
|
||||
</PRE>
|
||||
<?php
|
||||
pg_freeresult ($qu);
|
||||
pg_close ($db_conn);
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue