georg Fri Feb 20 06:10:11 2004 EDT
Modified files:
/phpdoc/en/reference/mysqli/functions mysqli-connect-errno.xml
mysqli-connect-error.xml
mysqli-connect.xml
Log:
fixed bugs in mysql_connect_err*
added sample for mysqli_connect
http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-connect-errno.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc/en/reference/mysqli/functions/mysqli-connect-errno.xml
diff -u phpdoc/en/reference/mysqli/functions/mysqli-connect-errno.xml:1.2
phpdoc/en/reference/mysqli/functions/mysqli-connect-errno.xml:1.3
--- phpdoc/en/reference/mysqli/functions/mysqli-connect-errno.xml:1.2 Fri Feb 20
03:54:11 2004
+++ phpdoc/en/reference/mysqli/functions/mysqli-connect-errno.xml Fri Feb 20
06:10:10 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.mysqli-connect-errno">
<refnamediv>
<refname>mysqli_connect_errno</refname>
@@ -33,6 +33,16 @@
</para>
</refsect1>
<refsect1>
+ <title>See also</title>
+ <para>
+ <function>mysqli_connect</function>,
+ <function>mysqli_connect_error</function>,
+ <function>mysqli_errno</function>,
+ <function>mysqli_error</function>,
+ <function>mysqli_sqlstate</function>
+ </para>
+ </refsect1>
+ <refsect1>
<title>Example</title>
<para>
<example>
@@ -52,16 +62,6 @@
</example>
</para>
</refsect1>
- <refsect1>
- <title>See also</title>
- <para>
- <function>mysqli_connect</function>,
- <function>mysqli_connect_error</function>,
- <function>mysqli_errno</function>,
- <function>mysqli_error</function>,
- <function>mysqli_sqlstate</function>
- </para>
- </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-connect-error.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc/en/reference/mysqli/functions/mysqli-connect-error.xml
diff -u phpdoc/en/reference/mysqli/functions/mysqli-connect-error.xml:1.2
phpdoc/en/reference/mysqli/functions/mysqli-connect-error.xml:1.3
--- phpdoc/en/reference/mysqli/functions/mysqli-connect-error.xml:1.2 Fri Feb 20
03:54:11 2004
+++ phpdoc/en/reference/mysqli/functions/mysqli-connect-error.xml Fri Feb 20
06:10:11 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.mysqli-connect-error">
<refnamediv>
<refname>mysqli_connect_error</refname>
@@ -27,6 +27,16 @@
</para>
</refsect1>
<refsect1>
+ <title>See also</title>
+ <para>
+ <function>mysqli_connect</function>,
+ <function>mysqli_connect_errno</function>,
+ <function>mysqli_errno</function>,
+ <function>mysqli_error</function>,
+ <function>mysqli_sqlstate</function>
+ </para>
+ </refsect1>
+ <refsect1>
<title>Example</title>
<para>
<example>
@@ -46,16 +56,6 @@
</example>
</para>
</refsect1>
- <refsect1>
- <title>See also</title>
- <para>
- <function>mysqli_connect</function>,
- <function>mysqli_connect_errno</function>,
- <function>mysqli_errno</function>,
- <function>mysqli_error</function>,
- <function>mysqli_sqlstate</function>
- </para>
- </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-connect.xml?r1=1.9&r2=1.10&ty=u
Index: phpdoc/en/reference/mysqli/functions/mysqli-connect.xml
diff -u phpdoc/en/reference/mysqli/functions/mysqli-connect.xml:1.9
phpdoc/en/reference/mysqli/functions/mysqli-connect.xml:1.10
--- phpdoc/en/reference/mysqli/functions/mysqli-connect.xml:1.9 Fri Feb 20 05:16:57
2004
+++ phpdoc/en/reference/mysqli/functions/mysqli-connect.xml Fri Feb 20 06:10:11
2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<refentry id="function.mysqli-connect">
<refnamediv>
<refname>mysqli_connect</refname>
@@ -75,38 +75,39 @@
<title>Example</title>
<para>
<example>
- <title>Using the mysqli_connect function</title>
+ <title>Object oriented style</title>
<programlisting role="php">
<![CDATA[
<?php
/*
- +-----------------------------------------------------------+
- | file: mysqli_connect.php |
- +-----------------------------------------------------------+
- | connects to MySQL server on localhost and prints host |
- | information |
- +-----------------------------------------------------------+
-*/
-
- /* ---- Procedural style ---- */
- $link = mysqli_connect("localhost", "my_user", "my_password", "test")
- or die("Can't connect to MySQL server on localhost");
-
- printf("Host information: %s\n", mysqli_get_host_info($link));
-
- mysqli_close($link);
-
- /* ---- Object oriented style ----*/
- $mysqli = new mysqli("localhost", "my_user", "my_password", "test");
-
- if (mysqli_connect_errno()) {
- printf("Connect failed: %s\n", mysqli_connect_error());
- exit();
- }
+$mysqli = new mysqli("localhost", "my_user", "my_password", "test");
- printf("Host information: %s\n", $mysqli->host_info);
+if (mysqli_connect_errno()) {
+ printf("Connect failed: %s\n", mysqli_connect_error());
+ exit();
+}
- $mysqli->close();
+printf("Host information: %s\n", $mysqli->host_info);
+
+/* close connection */
+$mysqli->close();
+?>
+]]>
+ </programlisting>
+ </example>
+ <example>
+ <title>Procedural style</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+/*
+$link = mysqli_connect("localhost", "my_user", "my_password", "test")
+ or die("Can't connect to MySQL server on localhost");
+
+printf("Host information: %s\n", mysqli_get_host_info($link));
+
+/* close connection */
+mysqli_close($link);
?>
]]>
</programlisting>