Better explanations of what mysql_errno() and mysql_error() do.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30792 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Torben Wilson 2000-08-22 01:36:03 +00:00
parent 8750c0e354
commit 0969190ed3

View file

@ -439,10 +439,19 @@
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns the error number from the last mySQL function, or
<literal>0</literal> (zero) if no error occurred.
</para>
<para>
Errors coming back from the mySQL database backend no longer
issue warnings. Instead, use these functions to retrieve the
error number.
issue warnings. Instead, use <function>mysql_errno</function> to
retrieve the error code. Note that this function only returns the
error code from the most recently executed mySQL function (not
including <function>mysql_error</function> and
<function>mysql_errno</function>), so if you want to use it,
make sure you check the value before calling another mySQL
function.
<informalexample>
<programlisting role="php">
&lt;?php
@ -480,10 +489,18 @@ echo mysql_errno().": ".mysql_error()."&lt;BR>";
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns the error text from the last mySQL function, or
<literal>''</literal> (the empty string) if no error occurred.
</para>
<para>
Errors coming back from the mySQL database backend no longer
issue warnings. Instead, use these functions to retrieve the
error string.
issue warnings. Instead, use <function>mysql_error</function> to
retrieve the error text. Note that this function only returns the
error text from the most recently executed mySQL function (not
including <function>mysql_error</function> and
<function>mysql_errno</function>), so if you want to use it, make
sure you check the value before calling another mySQL function.
<informalexample>
<programlisting role="php">
&lt;?php