php-doc-en/reference/maxdb/functions/maxdb-connect-errno.xml
Philip Olson 04b11e621f Fixed spelling
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@329325 c90b9560-bf6c-de11-be94-00142212c4b1
2013-01-29 01:47:09 +00:00

91 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.maxdb-connect-errno">
<refnamediv>
<refname>maxdb_connect_errno</refname>
<refpurpose>Returns the error code from last connect call</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>maxdb_connect_errno</methodname>
<void />
</methodsynopsis>
<para>
The <function>maxdb_connect_errno</function> function will return the last error code number
for last call to <function>maxdb_connect</function>.
If no errors have occurred, this function will return zero.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
An error code value for the last call to <function>maxdb_connect</function>, if it failed.
zero means no error occurred.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>maxdb_connect_errno sample</title>
<programlisting role="php">
<![CDATA[
<?php
$link = maxdb_connect("localhost", "XXXXXXXX", "YYYYYYYYY");
if (!$link) {
printf("Can't connect to localhost. Errorcode: %d\n", maxdb_connect_errno());
}
?>
]]>
</programlisting>
</example>
</para>
&example.outputs.similar;
<screen>
<![CDATA[
PHP Warning: maxdb_connect(): -4008 POS(1) Unknown user name/password combination [08004] <...>
Can't connect to localhost. Errorcode: -4008
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>maxdb_connect</function></member>
<member><function>maxdb_connect_error</function></member>
<member><function>maxdb_errno</function></member>
<member><function>maxdb_error</function></member>
<member><function>maxdb_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:"~/.phpdoc/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
-->