php-doc-en/reference/mysqli/functions/mysqli-connect-errno.xml
Hannes Magnusson c030e2adf7 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-20 22:25:43 +00:00

93 lines
2.4 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
<refentry xml:id="function.mysqli-connect-errno" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mysqli_connect_errno</refname>
<refpurpose>Returns the error code from last connect call</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>mysqli_connect_errno</methodname>
<void />
</methodsynopsis>
<para>
Returns the last error code number from the last call to
<function>mysqli_connect</function>.
</para>
<note>
<para>
Client error message numbers are listed in the MySQL
<filename>errmsg.h</filename> header file, server error message numbers
are listed in <filename>mysqld_error.h</filename>. In the MySQL source
distribution you can find a complete list of error messages and error
numbers in the file <filename>Docs/mysqld_error.txt</filename>.
</para>
</note>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
An error code value for the last call to <function>mysqli_connect</function>, if it failed.
zero means no error occurred.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>mysqli_connect_errno</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$link = @mysqli_connect("localhost", "nonexisting_user", "");
if (!$link) {
printf("Can't connect to localhost. Errorcode: %d\n", mysqli_connect_errno());
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>mysqli_connect</function></member>
<member><function>mysqli_connect_error</function></member>
<member><function>mysqli_errno</function></member>
<member><function>mysqli_error</function></member>
<member><function>mysqli_sqlstate</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- 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
-->