mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Changed example for sample of second parameter
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@249116 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6c9cf68f36
commit
5843658ca5
1 changed files with 9 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.17 $ -->
|
||||
<!-- $Revision: 1.18 $ -->
|
||||
<refentry xml:id="function.mysql-fetch-object" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mysql_fetch_object</refname>
|
||||
|
@ -112,14 +112,16 @@ mysql_free_result($result);
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
class foo {
|
||||
public $name;
|
||||
}
|
||||
|
||||
$row = mysql_fetch_object($result);
|
||||
|
||||
/* this is valid */
|
||||
echo $row->field;
|
||||
/* this is invalid */
|
||||
// echo $row->0;
|
||||
mysql_connect("hostname", "user", "password");
|
||||
mysql_select_db("mydb");
|
||||
|
||||
$result = mysql_query("select name from mytable limit 1");
|
||||
$obj = mysql_fetch_object($result, 'foo');
|
||||
var_dump($obj);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue