mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
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:
parent
8750c0e354
commit
0969190ed3
1 changed files with 21 additions and 4 deletions
|
@ -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">
|
||||
<?php
|
||||
|
@ -480,10 +489,18 @@ echo mysql_errno().": ".mysql_error()."<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">
|
||||
<?php
|
||||
|
|
Loading…
Reference in a new issue