- LT hacking

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@134983 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Derick Rethans 2003-07-13 19:29:00 +00:00
parent 651529b6d2
commit ba3104e348
6 changed files with 27 additions and 21 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
<refentry id="function.mysql-affected-rows">
<refnamediv>
@ -72,7 +72,7 @@
]]>
</programlisting>
<para>
The above example would produce the following output:
The above example would produce the following output:
</para>
<screen>
<![CDATA[
@ -81,6 +81,8 @@ Records deleted: 0
]]>
</screen>
</example>
</para>
<para>
<example>
<title>Update-Query</title>
<programlisting role="php">
@ -94,7 +96,7 @@ Records deleted: 0
/* Update records */
mysql_query("UPDATE mytable SET used=1 WHERE id < 10");
printf ("Updated records: %d\n", mysql_affected_rows());
mysql_query("COMMIT");
mysql_query("COMMIT");
?>
]]>
</programlisting>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
<refentry id="function.mysql-field-name">
<refnamediv>
@ -36,6 +36,7 @@
<title><function>mysql_field_name</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* The users table consists of three fields:
* user_id
* username
@ -49,6 +50,7 @@ $res = mysql_query("select * from users", $link);
echo mysql_field_name($res, 0) . "\n";
echo mysql_field_name($res, 2);
?>
]]>
</programlisting>
<para>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 -->
<refentry id="function.mysql-stat">
<refnamediv>
@ -17,7 +17,7 @@
</para>
<note>
<para>
<function>mysql_stat</function> currently only returns status for uptime,
<function>mysql_stat</function> currently only returns status for uptime,
threads, queries, open tables, flush tables and queries per second. For a
complete list of other status variables you have to use the SHOW STATUS
SQL command.

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.34 -->
<refentry id="function.get-defined-vars">
<refnamediv>
@ -18,6 +18,8 @@
This function returns an multidimensional array containing a list of
all defined variables, be them environment, server or user-defined
variables.
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
@ -29,8 +31,8 @@ $arr = get_defined_vars();
// print $b
print_r($arr["b"]);
// print path to the PHP interpreter (if used as a CGI)
// e.g. /usr/local/bin/php
/* print path to the PHP interpreter (if used as a CGI)
* e.g. /usr/local/bin/php */
echo $arr["_"];
// print the command-line paramaters if any

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.75 -->
<refentry id="function.get-resource-type">
<refnamediv>
@ -15,25 +15,26 @@
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
</methodsynopsis>
<para>
This function returns a string representing the type of the
<type>resource</type> passed to it. If the paramater is not a
valid <type>resource</type>, it
generates an error.
This function returns a string representing the type of the
<type>resource</type> passed to it. If the paramater is not a valid
<type>resource</type>, it generates an error.
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
// prints: mysql link
$c = mysql_connect();
echo get_resource_type($c)."\n";
// prints: mysql link
$fp = fopen("foo","w");
echo get_resource_type($fp)."\n";
// prints: file
$fp = fopen("foo", "w");
echo get_resource_type($fp)."\n";
// prints: domxml document
$doc = new_xmldoc("1.0");
echo get_resource_type($doc->doc)."\n";
// prints: domxml document
?>
]]>
</programlisting>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.2 -->
<refentry id="function.gettype">
<refnamediv>
@ -20,8 +20,7 @@
<simpara>
Never use <function>gettype</function> to test for a certain type,
since the returned string may be subject to change in a future version.
In addition, it is slow too, as it involves string comparision <!--
where's my dictionary? -->.
In addition, it is slow too, as it involves string comparision.
</simpara>
<simpara>
Instead, use the <literal>is_*</literal> functions.