MFB: Upgrade to the new-reference-structure

- (Created missing setup sections in setup.xml, if any)
 - Moved the intro to book.xml
 - Changed the intro ID from <extname>.intro to intro.<extname>
 - Moved the constants entity to book.xml
 - Changed constants.xml to be an appendix
 - Moved the example to its own chapter (examples.xml)
    NOTE: The chapter ID is mysql.examples, the orginal section is now mysql.examples-basic
 - Moved the requirements & resources section to setup.xml
 - Moved the configure and ini entities to setup.xml
NOTE: There is still a <partintro> in reference.xml (mysql.notes)


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@249010 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2007-12-26 14:01:35 +00:00
parent 532f82e4cf
commit 1220ed5e63
5 changed files with 184 additions and 87 deletions

51
reference/mysql/book.xml Normal file
View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.2 $ -->
<!-- Purpose: database.vendors -->
<!-- Membership: bundled, external -->
<book xml:id="book.mysql" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>MySQL</title>
<!-- {{{ preface -->
<preface xml:id="intro.mysql">
&reftitle.intro;
<para>
These functions allow you to access MySQL database servers.
More information about MySQL can be found at <link
xlink:href="&url.mysql;">&url.mysql;</link>.
</para>
<para>
Documentation for MySQL can be found at <link
xlink:href="&url.mysql.docs;">&url.mysql.docs;</link>.
</para>
</preface>
<!-- }}} -->
&reference.mysql.setup;
&reference.mysql.constants;
&reference.mysql.examples;
&reference.mysql.reference;
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<section xml:id="mysql.constants" xmlns="http://docbook.org/ns/docbook">
<!-- $Revision: 1.10 $ -->
<appendix xml:id="mysql.constants" xmlns="http://docbook.org/ns/docbook">
&reftitle.constants;
&extension.constants;
<para>
@ -81,7 +81,7 @@
</tgroup>
</table>
</para>
</section>
</appendix>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<chapter xml:id="mysql.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.examples;
<section xml:id="mysql.examples-basic">
<para>
This simple example shows how to connect, execute a query, print
resulting rows and disconnect from a MySQL database.
<example>
<title>MySQL extension overview example</title>
<programlisting role="php">
<![CDATA[
<?php
// Connecting, selecting database
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_database') or die('Could not select database');
// Performing SQL query
$query = 'SELECT * FROM my_table';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
]]>
</programlisting>
</example>
</para>
</section>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,49 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.24 $ -->
<!-- Purpose: database.vendors -->
<!-- Membership: bundled, external -->
<!-- $Revision: 1.25 $ -->
<reference xml:id="ref.mysql" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>MySQL Functions</title>
<titleabbrev>MySQL</titleabbrev>
<title>MySQL &Functions;</title>
<partintro>
<section xml:id="mysql.intro">
&reftitle.intro;
<para>
These functions allow you to access MySQL database servers.
More information about MySQL can be found at <link
xlink:href="&url.mysql;">&url.mysql;</link>.
</para>
<para>
Documentation for MySQL can be found at <link
xlink:href="&url.mysql.docs;">&url.mysql.docs;</link>.
</para>
</section>
<section xml:id="mysql.requirements">
&reftitle.required;
<para>
In order to have these functions available, you must compile PHP with
MySQL support.
</para>
</section>
&reference.mysql.configure;
&reference.mysql.ini;
<section xml:id="mysql.resources">
&reftitle.resources;
<para>
There are two resource types used in the MySQL module. The first one
is the link identifier for a database connection, the second a resource
which holds the result of a query.
</para>
</section>
&reference.mysql.constants;
<section xml:id="mysql.notes">
&reftitle.notes;
<note>
@ -56,49 +17,6 @@
</para>
</note>
</section>
<section xml:id="mysql.examples">
&reftitle.examples;
<para>
This simple example shows how to connect, execute a query, print
resulting rows and disconnect from a MySQL database.
<example>
<title>MySQL extension overview example</title>
<programlisting role="php">
<![CDATA[
<?php
// Connecting, selecting database
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_database') or die('Could not select database');
// Performing SQL query
$query = 'SELECT * FROM my_table';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
]]>
</programlisting>
</example>
</para>
</section>
</partintro>
&reference.mysql.entities.functions;
@ -125,3 +43,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

58
reference/mysql/setup.xml Normal file
View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.2 $ -->
<chapter xml:id="mysql.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<!-- {{{ Requirements -->
<section xml:id="mysql.requirements">
&reftitle.required;
<para>
In order to have these functions available, you must compile PHP with
MySQL support.
</para>
</section>
<!-- }}} -->
<!-- {{{ Installation -->
&reference.mysql.configure;
<!-- }}} -->
<!-- {{{ Configuration -->
&reference.mysql.ini;
<!-- }}} -->
<!-- {{{ Resources -->
<section xml:id="mysql.resources">
&reftitle.resources;
<para>
There are two resource types used in the MySQL module. The first one
is the link identifier for a database connection, the second a resource
which holds the result of a query.
</para>
</section>
<!-- }}} -->
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->