mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Send arguments to function via attributes
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@326070 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
747727e84a
commit
07916c82c5
8 changed files with 30 additions and 30 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.mysql-fetch-assoc" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xml:id="function.mysql-fetch-assoc" xmlns="http://docbook.org/ns/docbook" xmlns:phd="http://www.php.net/ns/phd">
|
||||
<refnamediv>
|
||||
<refname>mysql_fetch_assoc</refname>
|
||||
<refpurpose>Fetch a result row as an associative array</refpurpose>
|
||||
|
@ -11,11 +11,11 @@
|
|||
&mysql.alternative.note;
|
||||
<simplelist role="alternatives">
|
||||
<member><function>mysqli_fetch_assoc</function></member>
|
||||
<member><methodname>PDOStatement::fetch</methodname> (<constant>PDO::FETCH_ASSOC</constant>)</member>
|
||||
<member><methodname phd:args="PDO::FETCH_ASSOC">PDOStatement::fetch</methodname></member>
|
||||
</simplelist>
|
||||
</sidebar>
|
||||
</refsynopsisdiv>
|
||||
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an associative array of strings that corresponds to the fetched row, or
|
||||
Returns an associative array of strings that corresponds to the fetched row, or
|
||||
&false; if there are no more rows.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -72,13 +72,13 @@ if (!$conn) {
|
|||
echo "Unable to connect to DB: " . mysql_error();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if (!mysql_select_db("mydbname")) {
|
||||
echo "Unable to select mydbname: " . mysql_error();
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = "SELECT id as userid, fullname, userstatus
|
||||
$sql = "SELECT id as userid, fullname, userstatus
|
||||
FROM sometable
|
||||
WHERE userstatus = 1";
|
||||
|
||||
|
@ -118,10 +118,10 @@ mysql_free_result($result);
|
|||
<note>
|
||||
<title>Performance</title>
|
||||
<para>
|
||||
An important thing to note is that using
|
||||
<function>mysql_fetch_assoc</function> is <emphasis>not
|
||||
An important thing to note is that using
|
||||
<function>mysql_fetch_assoc</function> is <emphasis>not
|
||||
significantly</emphasis> slower than using
|
||||
<function>mysql_fetch_row</function>, while it
|
||||
<function>mysql_fetch_row</function>, while it
|
||||
provides a significant added value.
|
||||
</para>
|
||||
</note>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.mysql-fetch-object" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xml:id="function.mysql-fetch-object" xmlns="http://docbook.org/ns/docbook" xmlns:phd="http://www.php.net/ns/phd">
|
||||
<refnamediv>
|
||||
<refname>mysql_fetch_object</refname>
|
||||
<refpurpose>Fetch a result row as an object</refpurpose>
|
||||
|
@ -11,7 +11,7 @@
|
|||
&mysql.alternative.note;
|
||||
<simplelist role="alternatives">
|
||||
<member><function>mysqli_fetch_object</function></member>
|
||||
<member><methodname>PDOStatement::fetch</methodname> (<constant>PDO::FETCH_OBJ</constant>)</member>
|
||||
<member><methodname phd:args="PDO::FETCH_OBJ">PDOStatement::fetch</methodname></member>
|
||||
</simplelist>
|
||||
</sidebar>
|
||||
</refsynopsisdiv>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.mysql-fetch-row" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xml:id="function.mysql-fetch-row" xmlns="http://docbook.org/ns/docbook" xmlns:phd="http://www.php.net/ns/phd">
|
||||
<refnamediv>
|
||||
<refname>mysql_fetch_row</refname>
|
||||
<refpurpose>Get a result row as an enumerated array</refpurpose>
|
||||
|
@ -11,7 +11,7 @@
|
|||
&mysql.alternative.note;
|
||||
<simplelist role="alternatives">
|
||||
<member><function>mysqli_fetch_row</function></member>
|
||||
<member><methodname>PDOStatement::fetch</methodname> (<constant>PDO::FETCH_NUM</constant>)</member>
|
||||
<member><methodname phd:args="PDO::FETCH_NUM">PDOStatement::fetch</methodname></member>
|
||||
</simplelist>
|
||||
</sidebar>
|
||||
</refsynopsisdiv>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an numerical array of strings that corresponds to the fetched row, or
|
||||
Returns an numerical array of strings that corresponds to the fetched row, or
|
||||
&false; if there are no more rows.
|
||||
</para>
|
||||
<para>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.mysql-get-client-info" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xml:id="function.mysql-get-client-info" xmlns="http://docbook.org/ns/docbook" xmlns:phd="http://www.php.net/ns/phd">
|
||||
<refnamediv>
|
||||
<refname>mysql_get_client_info</refname>
|
||||
<refpurpose>Get MySQL client info</refpurpose>
|
||||
|
@ -11,7 +11,7 @@
|
|||
&mysql.alternative.note;
|
||||
<simplelist role="alternatives">
|
||||
<member><function>mysqli_get_client_info</function></member>
|
||||
<member><methodname>PDO::getAttribute</methodname> (<constant>PDO::ATTR_CLIENT_VERSION</constant>)</member>
|
||||
<member><methodname phd:args="PDO::ATTR_CLIENT_VERSION">PDO::getAttribute</methodname></member>
|
||||
</simplelist>
|
||||
</sidebar>
|
||||
</refsynopsisdiv>
|
||||
|
@ -34,7 +34,7 @@
|
|||
The MySQL client version.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.mysql-get-host-info" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xml:id="function.mysql-get-host-info" xmlns="http://docbook.org/ns/docbook" xmlns:phd="http://www.php.net/ns/phd">
|
||||
<refnamediv>
|
||||
<refname>mysql_get_host_info</refname>
|
||||
<refpurpose>Get MySQL host info</refpurpose>
|
||||
|
@ -11,7 +11,7 @@
|
|||
&mysql.alternative.note;
|
||||
<simplelist role="alternatives">
|
||||
<member><function>mysqli_get_host_info</function></member>
|
||||
<member><methodname>PDO::getAttribute</methodname> (<constant>PDO::ATTR_CONNECTION_STATUS</constant>)</member>
|
||||
<member><methodname phd:args="PDO::ATTR_CONNECTION_STATUS">PDO::getAttribute</methodname></member>
|
||||
</simplelist>
|
||||
</sidebar>
|
||||
</refsynopsisdiv>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Describes the type of connection in use for the connection, including the
|
||||
Describes the type of connection in use for the connection, including the
|
||||
server host name.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a string describing the type of MySQL connection in use for the
|
||||
Returns a string describing the type of MySQL connection in use for the
|
||||
connection&return.falseforfailure;.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.mysql-get-server-info" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xml:id="function.mysql-get-server-info" xmlns="http://docbook.org/ns/docbook" xmlns:phd="http://www.php.net/ns/phd">
|
||||
<refnamediv>
|
||||
<refname>mysql_get_server_info</refname>
|
||||
<refpurpose>Get MySQL server info</refpurpose>
|
||||
|
@ -11,7 +11,7 @@
|
|||
&mysql.alternative.note;
|
||||
<simplelist role="alternatives">
|
||||
<member><function>mysqli_get_server_info</function></member>
|
||||
<member><methodname>PDO::getAttribute</methodname> (<constant>PDO::ATTR_SERVER_VERSION</constant>)</member>
|
||||
<member><methodname phd:args="PDO::ATTR_SERVER_VERSION">PDO::getAttribute</methodname></member>
|
||||
</simplelist>
|
||||
</sidebar>
|
||||
</refsynopsisdiv>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.mysql-set-charset" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.mysql-set-charset" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:phd="http://www.php.net/ns/phd">
|
||||
<refnamediv>
|
||||
<refname>mysql_set_charset</refname>
|
||||
<refpurpose>Sets the client character set</refpurpose>
|
||||
|
@ -11,7 +11,7 @@
|
|||
&mysql.alternative.note;
|
||||
<simplelist role="alternatives">
|
||||
<member><function>mysqli_character_set_name</function></member>
|
||||
<member><methodname>PDO::setAttribute</methodname> (e.g., <literal>$db->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8'");</literal>)</member>
|
||||
<member><methodname phd:args="PDO::MYSQL_ATTR_INIT_COMMAND, 'SET NAMES utf8'">PDO::setAttribute</methodname></member>
|
||||
</simplelist>
|
||||
</sidebar>
|
||||
</refsynopsisdiv>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter><initializer>NULL</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets the default character set for the current connection.
|
||||
Sets the default character set for the current connection.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
|||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
@ -78,7 +78,7 @@
|
|||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.mysql-stat" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xml:id="function.mysql-stat" xmlns="http://docbook.org/ns/docbook" xmlns:phd="http://www.php.net/ns/phd">
|
||||
<refnamediv>
|
||||
<refname>mysql_stat</refname>
|
||||
<refpurpose>Get current system status</refpurpose>
|
||||
|
@ -11,7 +11,7 @@
|
|||
&mysql.alternative.note;
|
||||
<simplelist role="alternatives">
|
||||
<member><function>mysqli_stat</function></member>
|
||||
<member><methodname>PDO::getAttribute</methodname> (<constant>PDO::ATTR_SERVER_INFO</constant>)</member>
|
||||
<member><methodname phd:args="PDO::ATTR_SERVER_INFO">PDO::getAttribute</methodname></member>
|
||||
</simplelist>
|
||||
</sidebar>
|
||||
</refsynopsisdiv>
|
||||
|
|
Loading…
Reference in a new issue