didou Wed Jul 16 13:09:51 2003 EDT
Modified files:
/phpdoc/en/reference/dbx/functions dbx-connect.xml dbx-query.xml
Log:
adding PHP tags in the examples
Index: phpdoc/en/reference/dbx/functions/dbx-connect.xml
diff -u phpdoc/en/reference/dbx/functions/dbx-connect.xml:1.7
phpdoc/en/reference/dbx/functions/dbx-connect.xml:1.8
--- phpdoc/en/reference/dbx/functions/dbx-connect.xml:1.7 Wed Jul 9 12:40:04
2003
+++ phpdoc/en/reference/dbx/functions/dbx-connect.xml Wed Jul 16 13:09:51 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/dbx.xml, last change in rev 1.3 -->
<refentry id="function.dbx-connect">
<refnamediv>
@@ -106,8 +106,10 @@
<informalexample>
<programlisting role="php">
<![CDATA[
+<?php
$link = dbx_connect (DBX_MYSQL, "localhost", "db", "username", "password");
mysql_close ($link->handle); // dbx_close($link) would be better here
+?>
]]>
</programlisting>
</informalexample>
Index: phpdoc/en/reference/dbx/functions/dbx-query.xml
diff -u phpdoc/en/reference/dbx/functions/dbx-query.xml:1.8
phpdoc/en/reference/dbx/functions/dbx-query.xml:1.9
--- phpdoc/en/reference/dbx/functions/dbx-query.xml:1.8 Tue Feb 11 18:13:12 2003
+++ phpdoc/en/reference/dbx/functions/dbx-query.xml Wed Jul 16 13:09:51 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/dbx.xml, last change in rev 1.3 -->
<refentry id="function.dbx-query">
<refnamediv>
@@ -175,8 +175,10 @@
<informalexample role="php">
<programlisting>
<![CDATA[
+<?php
$result = dbx_query ($link, "SELECT id FROM table");
mysql_field_len ($result->handle, 0);
+?>
]]>
</programlisting>
</informalexample>
@@ -194,9 +196,11 @@
<informalexample>
<programlisting role="php">
<![CDATA[
+<?php
$result = dbx_query ($link, 'SELECT id FROM table');
echo $result->rows; // number of records
echo $result->cols; // number of fields
+?>
]]>
</programlisting>
</informalexample>
@@ -219,6 +223,7 @@
<title>lists each field's name and type</title>
<programlisting role="php">
<![CDATA[
+<?php
$result = dbx_query ($link, 'SELECT id FROM table',
DBX_RESULT_INDEX | DBX_RESULT_INFO);
@@ -226,6 +231,7 @@
echo $result->info['name'][$i] . "\n";
echo $result->info['type'][$i] . "\n";
}
+?>
]]>
</programlisting>
</example>
@@ -246,6 +252,7 @@
<title>outputs the content of data property into HTML table</title>
<programlisting role="php">
<![CDATA[
+<?php
$result = dbx_query ($link, 'SELECT id, parentid, description FROM table');
echo "<table>\n";
@@ -257,6 +264,7 @@
echo "</tr>\n";
}
echo "</table>\n";
+?>
]]>
</programlisting>
</example>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php