mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Fix examples
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@83000 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
fd3d5de7ed
commit
01d05a8acf
1 changed files with 9 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.27 -->
|
||||
<refentry id="function.mysql-fetch-array">
|
||||
<refnamediv>
|
||||
|
@ -74,8 +74,9 @@ select table1.field as foo table2.field as bar from table1, table2
|
|||
|
||||
$result = mysql_query("SELECT id, name FROM mytable");
|
||||
|
||||
while (($row = mysql_fetch_array($result, MYSQL_NUM))
|
||||
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
|
||||
printf ("ID: %s Name: %s", $row[0], $row[1]);
|
||||
}
|
||||
|
||||
mysql_free_result($result);
|
||||
?>
|
||||
|
@ -93,8 +94,9 @@ select table1.field as foo table2.field as bar from table1, table2
|
|||
|
||||
$result = mysql_query("SELECT id, name FROM mytable");
|
||||
|
||||
while (($row = mysql_fetch_array($result, MYSQL_ASSOC))
|
||||
printf ("ID: %s Name: %s", $row["id"], $row["name"]);
|
||||
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
||||
printf ("ID: %s Name: %s", $row["id"], $row["name"]);
|
||||
}
|
||||
|
||||
mysql_free_result($result);
|
||||
?>
|
||||
|
@ -112,8 +114,9 @@ select table1.field as foo table2.field as bar from table1, table2
|
|||
|
||||
$result = mysql_query("SELECT id, name FROM mytable");
|
||||
|
||||
while (($row = mysql_fetch_array($result, MYSQL_BOTH))
|
||||
printf ("ID: %s Name: %s", $row[0], $row["name"]);
|
||||
while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
|
||||
printf ("ID: %s Name: %s", $row[0], $row["name"]);
|
||||
}
|
||||
|
||||
mysql_free_result($result);
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue