cvs: phpdoc /en/reference/mysqli/mysqli_stmt attr-get.xml attr-set.xml
| From: | Richard Quadling | Date: | Wed, 01 Oct 2008 11:17:26 +0000 |
| Subject: | cvs: phpdoc /en/reference/mysqli/mysqli_stmt attr-get.xml attr-set.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2180@lists.php.net to get a copy of this message | ||
rquadling Wed Oct 1 11:17:26 2008 UTC
Modified files:
/phpdoc/en/reference/mysqli/mysqli_stmt attr-get.xml attr-set.xml
Log:
Patches supplied by Anthony Bedford. Thank you.
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/mysqli/mysqli_stmt/attr-get.xml?r1=1.2&r2=1.3&diff_format=u
Index: phpdoc/en/reference/mysqli/mysqli_stmt/attr-get.xml
diff -u phpdoc/en/reference/mysqli/mysqli_stmt/attr-get.xml:1.2
phpdoc/en/reference/mysqli/mysqli_stmt/attr-get.xml:1.3
--- phpdoc/en/reference/mysqli/mysqli_stmt/attr-get.xml:1.2 Wed Jan 2 14:27:37 2008
+++ phpdoc/en/reference/mysqli/mysqli_stmt/attr-get.xml Wed Oct 1 11:17:25 2008
@@ -1,24 +1,54 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
+
<refentry xml:id="mysqli-stmt.attr-get" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mysqli_stmt::attr_get</refname>
<refname>mysqli_stmt_attr_get</refname>
- <refpurpose></refpurpose>
+ <refpurpose>Used to get the current value of a statement attribute</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
+ <para>Object oriented style (method):</para>
+ <methodsynopsis>
+ <type>int</type><methodname>mysqli_stmt::attr_get</methodname>
+
<methodparam><type>int</type><parameter>attr</parameter></methodparam>
+ </methodsynopsis>
+ <para>Procedural style:</para>
<methodsynopsis>
<type>int</type><methodname>mysqli_stmt_attr_get</methodname>
<methodparam><type>mysqli_stmt</type><parameter>stmt</parameter></methodparam>
<methodparam><type>int</type><parameter>attr</parameter></methodparam>
</methodsynopsis>
+ <para>
+ Gets the current value of a statement attribute.
+ </para>
+ </refsect1>
- &warn.undocumented.func;
-
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ &mysqli.stmt.description;
+ <varlistentry>
+ <term><parameter>attr</parameter></term>
+ <listitem>
+ <para>
+ The attribute that you want to get.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
</refsect1>
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns &false; if the attribute is not found, otherwise returns the value of the attribute.
+ </para>
+ </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/mysqli/mysqli_stmt/attr-set.xml?r1=1.3&r2=1.4&diff_format=u
Index: phpdoc/en/reference/mysqli/mysqli_stmt/attr-set.xml
diff -u phpdoc/en/reference/mysqli/mysqli_stmt/attr-set.xml:1.3
phpdoc/en/reference/mysqli/mysqli_stmt/attr-set.xml:1.4
--- phpdoc/en/reference/mysqli/mysqli_stmt/attr-set.xml:1.3 Wed Jan 2 16:09:25 2008
+++ phpdoc/en/reference/mysqli/mysqli_stmt/attr-set.xml Wed Oct 1 11:17:26 2008
@@ -1,25 +1,103 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
+
<refentry xmlns="http://docbook.org/ns/docbook"
xml:id="mysqli-stmt.attr-set">
<refnamediv>
<refname>mysqli_stmt::attr_set</refname>
<refname>mysqli_stmt_attr_set</refname>
- <refpurpose></refpurpose>
+ <refpurpose>Used to modify the behavior of a prepared statement</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
+ <para>Object oriented style (method):</para>
+ <methodsynopsis>
+ <type>bool</type><methodname>mysqli_stmt::attr_set</methodname>
+
<methodparam><type>int</type><parameter>attr</parameter></methodparam>
+
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
+ </methodsynopsis>
+ <para>Procedural style:</para>
<methodsynopsis>
<type>bool</type><methodname>mysqli_stmt_attr_set</methodname>
<methodparam><type>mysqli_stmt</type><parameter>stmt</parameter></methodparam>
<methodparam><type>int</type><parameter>attr</parameter></methodparam>
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
-
- &warn.undocumented.func;
-
+ <para>
+ Used to modify the behavior of a prepared statement. This function may be
+ called multiple times to set several attributes.
+ </para>
</refsect1>
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>&mysqli.stmt.description;<varlistentry>
+ <term><parameter>attr</parameter></term>
+ <listitem>
+ <para>
+ The attribute that you want to set. It can have one of the following values:
+ <table>
+ <title>Attribute values</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Character</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH</entry>
+ <entry>
+ If set to 1, causes <function>mysqli_stmt_store_result</function> to
+ update the metadata <literal>MYSQL_FIELD->max_length</literal> value.
+ </entry>
+ </row>
+ <row>
+ <entry>MYSQLI_STMT_ATTR_CURSOR_TYPE</entry>
+ <entry>
+ Type of cursor to open for statement when
<function>mysqli_stmt_execute</function>
+ is invoked. <parameter>mode</parameter> can be
<literal>MYSQLI_CURSOR_TYPE_NO_CURSOR</literal>
+ (the default) or <literal>MYSQLI_CURSOR_TYPE_READ_ONLY</literal>.
+ </entry>
+ </row>
+ <row>
+ <entry>MYSQLI_STMT_ATTR_PREFETCH_ROWS</entry>
+ <entry>
+ Number of rows to fetch from server at a time when using a cursor.
+ <parameter>mode</parameter> can be in the range from 1 to the maximum
+ value of unsigned long. The default is 1.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ <para>
+ If you use the <literal>MYSQLI_STMT_ATTR_CURSOR_TYPE</literal> option with
+ <literal>MYSQLI_CURSOR_TYPE_READ_ONLY</literal>, a cursor is opened for the
+ statement when you invoke <function>mysqli_stmt_execute</function>. If there
+ is already an open cursor from a previous
<function>mysqli_stmt_execute</function> call,
+ it closes the cursor before opening a new one.
<function>mysqli_stmt_reset</function>
+ also closes any open cursor before preparing the statement for re-execution.
+ <function>mysqli_stmt_free_result</function> closes any open cursor.
+ </para>
+ <para>
+ If you open a cursor for a prepared statement,
<function>mysqli_stmt_store_result</function>
+ is unnecessary.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>mode</parameter></term>
+ <listitem>
+ <para>The value to assign to the attribute.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
</refentry>
<!-- Keep this comment at the end of the file