mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Add mysql*_fetch_object optional arguments (been around since 5.0)
- an <literal>stdClass -> a <classname>stdClass.. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@219193 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7b78c068ca
commit
439e3e2628
3 changed files with 79 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.14 $ -->
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<refentry id="function.mysql-fetch-object">
|
||||
<refnamediv>
|
||||
<refname>mysql_fetch_object</refname>
|
||||
|
@ -11,6 +11,8 @@
|
|||
<methodsynopsis>
|
||||
<type>object</type><methodname>mysql_fetch_object</methodname>
|
||||
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>params</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns an object with properties that correspond to the fetched row
|
||||
|
@ -23,6 +25,24 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
&mysql.result.description;
|
||||
<varlistentry>
|
||||
<term><parameter>class_name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the class to instantiate, set the properties of and return.
|
||||
If not specified, a <classname>stdClass</classname> object is returned.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>params</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An optional <type>array</type> of parameters to pass to the constructor
|
||||
for <parameter>class_name</parameter> objects.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -41,6 +61,30 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.0.0</entry>
|
||||
<entry>
|
||||
Added the ability to return as a different object.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.16 $ -->
|
||||
<!-- $Revision: 1.17 $ -->
|
||||
<refentry id="function.mysqli-fetch-object">
|
||||
<refnamediv>
|
||||
<refname>mysqli_fetch_object</refname>
|
||||
|
@ -10,15 +10,18 @@
|
|||
<title>Description</title>
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>mysqli_fetch_object</methodname>
|
||||
<type>object</type><methodname>mysqli_fetch_object</methodname>
|
||||
<methodparam><type>mysqli_result</type><parameter>result</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>params</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style (method):</para>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>mysqli_result</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>fetch_object</methodname>
|
||||
<void />
|
||||
<type>object</type><methodname>fetch_object</methodname>
|
||||
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>params</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
|
@ -35,6 +38,31 @@
|
|||
&database.field-case;
|
||||
&database.fetch-null;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.0.0</entry>
|
||||
<entry>
|
||||
Added the ability to return as a different object.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.18 $ -->
|
||||
<!-- $Revision: 1.19 $ -->
|
||||
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.pg-fetch-object">
|
||||
<refnamediv>
|
||||
|
@ -92,7 +92,7 @@
|
|||
<listitem>
|
||||
<para>
|
||||
The name of the class to instantiate, set the properties of and return.
|
||||
If not specified, an <literal>stdClass</literal> object is returned.
|
||||
If not specified, a <classname>stdClass</classname> object is returned.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
Loading…
Reference in a new issue