manuzhai Mon Apr 29 05:48:33 2002 EDT
Modified files:
/phpdoc/nl/reference/mysql/functions mysql-error.xml
Log:
Updated to EN 1.5
Index: phpdoc/nl/reference/mysql/functions/mysql-error.xml
diff -u phpdoc/nl/reference/mysql/functions/mysql-error.xml:1.2
phpdoc/nl/reference/mysql/functions/mysql-error.xml:1.3
--- phpdoc/nl/reference/mysql/functions/mysql-error.xml:1.2 Wed Apr 17 03:14:09
2002
+++ phpdoc/nl/reference/mysql/functions/mysql-error.xml Mon Apr 29 05:48:33 2002
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- splitted from ./nl/functions/mysql.xml, last change in rev 1.4 -->
-<!-- last change to 'mysql-error' in en/ tree in rev 1.2 -->
-<!-- EN-Revision: 1.2 Maintainer: manuzhai Status: ready -->
-<!-- OLD-Revision: 1.95/EN.1.2 -->
+<!-- EN-Revision: 1.5 Maintainer: manuzhai Status: ready -->
<refentry id="function.mysql-error">
<refnamediv>
<refname>mysql_error</refname>
@@ -30,20 +27,32 @@
(<function>mysql_error</function> en <function>mysql_errno</function>
uitgezonderd) ophaalt, dus als je hem wil gebruiken, zorg dat je
de waarde controleert voordat je een andere MySQL functie aanroept.
- <informalexample>
+ <example>
+ <title><function>mysql_error</function> voorbeeld</title>
<programlisting role="php">
<![CDATA[
<?php
-mysql_connect("marliesle");
-echo mysql_errno().": ".mysql_error()."<BR>";
-mysql_select_db("nonexistentdb");
-echo mysql_errno().": ".mysql_error()."<BR>";
-$conn = mysql_query("SELECT * FROM nonexistenttable");
-echo mysql_errno().": ".mysql_error()."<BR>";
+ mysql_connect("localhost", "mysql_user", "mysql_password");
+
+ mysql_select_db("nonexistentdb");
+ echo mysql_errno() . ": " . mysql_error(). "\n";
+
+ mysql_select_db("kossu");
+ mysql_query("SELECT * FROM nonexistenttable");
+ echo mysql_errno() . ": " . mysql_error() . "\n";
?>
]]>
</programlisting>
- </informalexample>
+ <para>
+ Het bovenstaande voorbeeld zou de volgende output genereren:
+ </para>
+ <screen>
+<![CDATA[
+1049: Unknown database 'nonexistentdb'
+1146: Table 'kossu.nonexistenttable' doesn't exist
+]]>
+ </screen>
+ </example>
</para>
<para>
Zie ook: <function>mysql_errno</function>.